home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 8 / hdtst484.zip / HDTEST.DOC < prev    next >
Text File  |  1989-11-10  |  130KB  |  2,361 lines

  1.           
  2.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  3.           
  4.           
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                           HDTEST - Hard Disk Test/Repair Utility                          ______________________________________
  27.  
  28.                            Copyright (1984-1989), P. R. Fletcher                           _____________________________________
  29.                                     All Rights Reserved                                    ___________________
  30.  
  31.  
  32.  
  33.                         Distributed by:
  34.  
  35.                                P. R. Fletcher (Software)
  36.                                1515 West Montgomery Avenue
  37.                                Rosemont
  38.                                PA 19010
  39.            
  40.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  41.           
  42.           
  43.                                      TABLE OF CONTENTS                                     _________________
  44.  
  45.  
  46.           User-Supported Software                                    1
  47.           Introduction                                               2
  48.           Getting Started                                            5
  49.           Hardware and Software Requirements                         7
  50.           Limitations and Restrictions                               9
  51.           Running the Programs - HDCHEK                             10
  52.                                - HDTEST                             12
  53.           Using the On-Disk Pre-Boot                                16
  54.           Dealing with Bad Clusters                                 18
  55.           Running HDTEST from a .BAT file                           19
  56.           Bugs and Other Unpleasant Subjects                        20
  57.           Changes from Previous Versions                            20
  58.           Appendix A - Summary of Flag Settings                     24
  59.           Appendix B - Disk Error Messages                          26
  60.           Appendix C - Example Program Runs                         33
  61.           Registration Form                                         36
  62.            
  63.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  64.           
  65.           
  66.                                   USER-SUPPORTED SOFTWARE                                  _______________________
  67.  
  68.           Much of the software which is available for your computer has, in the
  69.           past, been produced and sold on the assumption that you are a crook
  70.           and that you will take any available opportunity to cheat software
  71.           writers and vendors out of their rightful reward. Such software was
  72.           copy-protected within an inch of its (and your computer's) life and
  73.           was priced at a level which still guaranteed its producers a profit
  74.           even if four or five illegal copies were made for each one sold.
  75.           Thankfully, prices of commercial software have (for the most part)
  76.           come down somewhat, and copy-protection is becoming much less
  77.           prevalent, but buying such software remains something of a lottery -
  78.           you often cannot be sure that the software does what you want in the
  79.           way you want it done until you have paid for it. User-supported
  80.           software (Shareware) is different. You may have got a copy of this
  81.           package free from a friend or a bulletin board or (for a nominal fee)
  82.           from a users' group or software library. In any case, you have a
  83.           perfectly legal working copy of the HDTEST package. You are encouraged
  84.           to make as many copies of the package as you like and to distribute
  85.           them to all your friends. If, after trying the program out, you find
  86.           that it is useful and want to continue to keep and use it, you must
  87.           register your copy by sending the registration fee ($35.00, unless you
  88.           are already a registered user of DIREDIT, in which case it is $25.00)
  89.           together with the completed registration form, to the address on the
  90.           form. Only your conscience can make you do this (although you are                                         ____                              
  91.           probably breaking the law if you don't), but bear in mind that the
  92.           distributors of "user-supported" software are making the assumption
  93.           that you are honest and willing to pay a reasonable price for a useful
  94.           program, many commercial software vendors, on the other hand, would
  95.           still apparently rather believe you are a crook. You can decide who
  96.           you would rather prove right. Registered users are entitled to
  97.           support, upgrades, and help with HDTEST-related problems (including
  98.           telephone support) for a year from the date of registration.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.           
  124.           
  125.                                           Page 1 
  126.            
  127.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  128.           
  129.           
  130.                                        INTRODUCTION                                       ____________
  131.  
  132.           HDTEST was originally written to allow comprehensive Read/Write
  133.           testing of hard disks on IBM PCs, XTs, ATs, and "true" compatibles.
  134.           The V4.10 release removed many of the hardware restrictions imposed by
  135.           earlier (V2.xx and V3.xx) versions of the program and made it useful
  136.           for testing most MS-DOS-compatible storage devices currently in use on
  137.           IBM-compatible computers, including removable (floppy and hard) disks
  138.           and logically partitioned hard disks. The V4.34 release included BIOS-
  139.           level support for DOS 3.3 (and above) "extended devices" and more
  140.           options for the handling of totally unreadable sectors. The V4.53
  141.           release added even more extensive support for IBM-incompatible
  142.           hardware and removed the requirement that ANSI.SYS be loaded to
  143.           support a proper screen display. The current release adds support for
  144.           the large (> 32Mb) devices allowed by DOS 4.0, the ability to locate
  145.           bad spots physically (by track, head, and sector) on the disk, and
  146.           some support for the use of .BAT files to run HDTEST on multiple disks
  147.           at one "sitting".
  148.  
  149.           Although many programs, including IBM's diagnostics, allow "surface
  150.           scanning" and seek testing of hard disks, none that are available to
  151.           the average user test whether the whole disk can retain the data that
  152.           is or will be written to it. HDTEST's principal "claim to fame" is the
  153.           ability thoroughly to test the magnetic media in a device which
  154.           contains data while preserving the data (although data loss is                        _________________________                       
  155.           unavoidable if an area which is in use has become unreadable). HDTEST                                                              ____             
  156.           tests the disk much more thoroughly than programs such as DFixer,
  157.           Mace, and Norton's DT. Mace and DT, like many public domain "disk
  158.           test" programs, simply read every cluster on the disk and report on
  159.           any errors encountered.  DFixer does better, writing 4 test patterns
  160.           to every free cluster and checking that they can be read back
  161.           correctly, but it makes no attempt to test clusters that are already
  162.           in use - the very ones which contain your precious data! Disk
  163.           Technician (TM), a product which has come to market fairly recently,
  164.           is more closely comparable to HDTEST than any other disk testing
  165.           program that I know about. It is, however, much more expensive, is
  166.           (functionally, at least) copy-protected, and is not available as                                                          ___             
  167.           Shareware!
  168.  
  169.           In addition to its testing function, HDTEST has been reported to be
  170.           useful as an automatic disk repair utility for both hard and floppy
  171.           disks which have developed (especially) intermittent or persistent
  172.           read errors, preventing or impeding their normal use. Although HDTEST
  173.           cannot read the totally unreadable, it tries much harder that DOS does
  174.           and will almost always, in the course of its operation, allow you to
  175.           recover the entire readable portion(s) of a file with one or more                             ________                                      
  176.           unreadable clusters in it, optionally either remapping all of what it
  177.           reads from the disk or replacing bad sectors (the default) or clusters
  178.           with NULLs. HDTEST is not an alternative to backing up your floppies                                ___                                           
  179.           and/or hard disk - it may sometimes be able to save your neck when you                                    _________                                   
  180.           forgot or your backup went bad too! On hard disks which have developed
  181.           intermittent read errors, running HDTEST can sometimes totally cure                                                   ___                       
  182.           the problem, presumably because the "flaky" sectors get rewritten and
  183.           the minor misalignments and/or weakening of the magnetic "image" which
  184.           were causing the trouble are corrected when the data is rewritten. In
  185.           its default ("slow") mode, HDTEST writes 20 different test patterns to
  186.           every cluster on the disk and checks that each pattern can be read          _____                                                             
  187.           
  188.           
  189.                                           Page 2 
  190.            
  191.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  192.           
  193.           
  194.           back correctly, while preserving (and eventually restoring) the
  195.           contents of the clusters that contain data.  HDTEST can even (on many
  196.           devices) detect hard disk errors which are minor enough to be
  197.           correctable (and corrected) by the disk controller's own "error-
  198.           correcting code" (ECC).  These errors are normally totally invisible
  199.           to programs running under DOS and will not usually be picked up by
  200.           other disk test utilities.  They may, however, be early signs of
  201.           problems that will become significant later, and HDTEST consequently
  202.           marks these clusters, too, as bad. As long as HDTEST can read the data
  203.           from a flaky cluster correctly once (and it tries quite hard) it will
  204.           be able to save the file of which that cluster is a part intact, while                                                                   ______       
  205.           marking the cluster so that DOS does not try to use it again. The
  206.           program was designed to minimize the likelihood of user error causing
  207.           data loss on a good (or slightly bad) disk, and to be easy to use - it
  208.           could not be made very fast, since multiple bit patterns have to be
  209.           written to and read from each cluster, and this takes a significant
  210.           time even on a fast hard disk. The program does, however, have a less
  211.           sensitive "fast" test mode, which writes only two test patterns to
  212.           each block and is recommended for use when testing/repairing floppy
  213.           disks and/or to correct intermittent problems or rule out gross
  214.           problems on a hard disk.
  215.  
  216.           The program can be used to test/repair single and double-sided 8- and
  217.           9-sector minifloppies (if you have plenty of patience!), as well as                                             ______                          
  218.           AT-format 1.2Mb minifloppies, 8" standard floppies, and 3.5"
  219.           microfloppies (with the same proviso regarding a need for patience).
  220.  
  221.           HDTEST's companion program, HDCHEK, simply examines the logical
  222.           structure of the system and target device and gives a short report on
  223.           what it finds. It does not write to the disk, and is provided                                 ___                                   
  224.           principally to allow a quick and easy, but fairly reliable, check on
  225.           the compatibility between HDTEST and a given software/hardware
  226.           configuration. As part of its report, HDCHEK notes at what level (DOS
  227.           interrupts only, INT 13, or direct entry to the BIOS) it was able to
  228.           access the target device, which has a bearing on HDTEST's ability to
  229.           detect certain types of errors. In general, if HDCHEK runs                                          __________                
  230.           successfully on a system and target device, then HDTEST can be
  231.           expected to do so, although the latter program requires much more
  232.           available memory.
  233.  
  234.           The HDTEST package is distributed as "User-supported Software". If you
  235.           intend to continue using the program, you are required to become a
  236.           Registered user. Send a completed copy of the Registration Form (which
  237.           is included in this documentation), together with a check or money
  238.           order for $35.00 (+ $5.00 for shipping outside the continent of North
  239.           America) to me at the address which appears on the form. Please also
  240.           add $2.50 (or equivalent) if you want the software on a 1.2 Mb HD
  241.           floppy or a 3.5" minifloppy, rather than a 360 Kb DSDD floppy, and
  242.           specify which you want on the Reg. form. Checks and money orders in
  243.           denominations other than U.S. dollars are acceptable, but please add a
  244.           further $10.00 for bank charges before using the current exchange rate
  245.           to calculate the fee in the currency in which you are paying. On
  246.           receiving your Registration, I will send you a personalised copy of
  247.           the latest, enhanced, version of the HDTEST package (currently V4.91),
  248.           and register you for a year's support. Registration entitles you to be
  249.           notified of upgrades, bug fixes, newly discovered incompatibilities,
  250.           etc., and to ask for (and get) necessary help in adapting the program
  251.           
  252.           
  253.                                           Page 3 
  254.            
  255.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  256.           
  257.           
  258.           to work on your hardware. I cannot guarantee to make HDTEST work with
  259.           every possible combination of hardware and software, but I will
  260.           promise to try to solve problems as they come up, and I will return
  261.           your Registration fee if I cannot support HDTEST on your system.
  262.           Support is available TO REGISTERED USERS ONLY by mail, BIXmail,                               ________________________                  
  263.           Compuserve EMail and telephone. Please also bear in mind that my
  264.           willingness and ability to continue to support and enhance these
  265.           programs will be directly dependent on users' willingness to pay the
  266.           Registration fee and (to some extent) inversely dependent on the
  267.           number of questions I get that could be answered by reading the docu-
  268.           mentation(!).
  269.  
  270.           The HD programs were written principally in C, compiled by the
  271.           Microsoft C compiler (Version 5.10) using its "small" memory model,
  272.           and linked with code from the distributed Microsoft C object libraries
  273.           using the Microsoft LINK program (Version 4.06).  Some low-level
  274.           functions were written in assembly language and assembled by the
  275.           Microsoft MASM Macro Assembler (Version 5.10). Portions of the
  276.           distributed program are consequently Copyright (C) by Microsoft Corp.,
  277.           1985 - 1988. All rights reserved. These portions are used under the
  278.           terms of a license from Microsoft Corp.
  279.  
  280.           The HD programs were written with care and have been tested on a
  281.           number of different systems.  I cannot, however, give any guarantee as
  282.           to their performance on a specific system, nor can I accept liability
  283.           for any actual or consequential loss resulting from their use. The
  284.           programs may only be used and/or copied in their original form.
  285.           Unauthorized modifications and/or the use of all or part of the
  286.           programs in other software, commercial or otherwise, are strictly
  287.           prohibited.
  288.  
  289.           The HD programs owe a lot of their value to suggestions and bug
  290.           reports (more of the former than the latter, fortunately) from
  291.           Registered users. They were originally written in response to
  292.           a "challenge" issued by Roedy Green on Bix, and their further
  293.           development has also been significantly influenced by his input.
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.           
  316.           
  317.                                           Page 4 
  318.            
  319.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  320.           
  321.           
  322.                                       GETTING STARTED                                      _______________
  323.  
  324.           This section gives step by step instructions for running HDCHEK and
  325.           HDTEST on the C: drive of a standard IBM PC, XT, AT, or 100%
  326.           compatible. Subsequent sections of this documentation go into much
  327.           more detail about some of the program's other features and options,
  328.           and should help to explain and let you deal with any problems which
  329.           you may encounter. Note that you should never attempt to run HDTEST                                                  _____                      
  330.           under a multi-tasking or multi-user operating system, nor activate any
  331.           "pop-up" program (e.g. SideKick) while the program is running.
  332.  
  333.           1) Use the DOS DISKCOPY program to make a duplicate of the
  334.           distribution disk, put the original away in a safe place, and use the
  335.           duplicate as your working disk.
  336.  
  337.           2) Make sure that you have current backups of all the files on drive
  338.           C:. This is particularly important when running the program for the
  339.           first time on a given system.
  340.  
  341.           3) Run DOS's CHKDSK program on drive C: and correct any errors
  342.           reported by it before proceeding further.
  343.  
  344.           4) Make the drive and/or directory which contains HDCHEK.EXE and
  345.           HDTEST.EXE your current drive and/or directory.
  346.  
  347.           5) Insert a formatted, non-write-protected floppy disk in drive A.
  348.           HDTEST will write an ASCII log file called HDTEST.LOG to this disk -
  349.           any other files on it will be undisturbed.
  350.  
  351.           6) Give the command: "HDCHEK C:". After a certain amount of disk
  352.           activity has taken place, and certainly within a minute or two, your
  353.           screen should look like one of the examples given in Appendix C. If
  354.           any errors are reported, DO NOT PROCEED until you have read the rest                                   ______________                             
  355.           of the documentation and/or are sure you know what is going on.
  356.  
  357.           7) If HDCHEK reported no errors, give the command "HDTEST C: A:".             ____________________________                                  
  358.           After some disk activity, the program will prompt for replies to three
  359.           questions - press <Return> in response to each prompt. The program
  360.           will report its progress to the screen and will record any problems
  361.           encountered in the log file on the floppy disk. Depending on the size
  362.           of your DOS partition and the access time of the disk, a complete run
  363.           of HDTEST (in its normal, "slow", mode) will take between 2 and 5
  364.           hours. Your intervention will only be required if a recovered bad          _____                                                            
  365.           cluster is found in a "hidden", "system", or write-protected file,
  366.           when you will be asked to approve remapping; otherwise, bad clusters
  367.           will be automatically remapped. HDTEST can be aborted at any time by
  368.           pressing <Esc> and responding to the "Are you sure...." prompt by
  369.           pressing <Return>.
  370.  
  371.           8) If HDTEST finishes testing without finding any bad clusters, it
  372.           will simply record that fact and the finishing time in the log file
  373.           and return to the DOS prompt. Otherwise, when read/write testing has
  374.           been completed, you will be prompted for permission to complete the
  375.           remapping process by updating the disk FATs and Directories.  Pressing
  376.           <Return> will allow this to take place, and you will then be returned
  377.           to the DOS prompt.
  378.           9) N.B. If HDTEST reported and remapped any bad clusters and you are             ____                                                  ___        
  379.           
  380.           
  381.                                           Page 5 
  382.            
  383.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  384.           
  385.           
  386.           using the DOS (3.3 and above) FASTOPEN utility, or any other
  387.           directory- or file-cacheing software, you should reboot your system
  388.           before proceeding with other work on it.
  389.  
  390.           10) In any event, if HDTEST reported and remapped some bad clusters,
  391.           you should read the section on "Dealing with bad clusters" later in
  392.           this documentation.
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.           
  444.           
  445.                                           Page 6 
  446.            
  447.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  448.           
  449.           
  450.                              HARDWARE & SOFTWARE REQUIREMENTS                             ________________________________
  451.  
  452.           HDTEST and HDCHEK make a number of assumptions about the environment
  453.           in which they are operating. They will, generally speaking, abort with
  454.           an informative error message if they find one of these assumptions to
  455.           be untrue! They require MS/PC-DOS 2.x or above and (for HDTEST) up to
  456.           about 320 Kb of free memory (the exact amount required depends on the
  457.           size and other characteristics of the device being tested) to run -
  458.           the presence of more memory may (slightly) increase HDTEST's speed
  459.           when testing devices with large cluster sizes. The device to be tested
  460.           must be usable as a normal DOS device - commands such as DIR, COPY,
  461.           and CHKDSK should be valid for it and for files and subdirectories on
  462.           it. It need not, however, be bootable. Only the DOS partition(s) of a
  463.           multi-operating-system disk can be tested, but all the partitions of a
  464.           disk that is divided into multiple DOS partitions can be tested (one                                             ___                              
  465.           by one). This version of HDTEST fully supports DOS 3.3 (and above)
  466.           extended partitions, and will test them as thoroughly as it does
  467.           normal DOS partitions. HDTEST's support for other disk partitioning
  468.           software is provided only to the extent that DOS support is provided
  469.           by the producers of that software.
  470.  
  471.           If you wish to use HDTEST to test a new hard disk which is to be                                       ____                               
  472.           configured to support multiple operating systems, you should first
  473.           configure it as one or more DOS partitions, test it in that
  474.           configuration, and then reconfigure it as you intend to use it. If you                                  __                                            
  475.           have low-level disk formatting software which allows you to specify
  476.           bad sectors and/or tracks to be "locked out", you can use HDTEST's /G
  477.           option on the DOS partition(s) to produce a list of defects, which can
  478.           then be used in reformatting the disk. Note that HDTEST can only be                                                                      ____   
  479.           used as a test for areas of the disk that are to be devoted to other                    ____                                                      
  480.           operating systems - when you repartition the disk, any remapping
  481.           and/or marking of bad clusters which HDTEST may have done in the DOS
  482.           partition is lost.
  483.  
  484.           Ideally, for normal hard disks, the BIOS handler for interrupt 13
  485.           should be capable of handling (at least) normal disk reads and writes
  486.           (sub-functions 2 and 3) in a way that is compatible with that
  487.           documented for the XT hard disk adapter (and AT BIOS) in IBM's
  488.           technical documentation. This should be no problem for most disk
  489.           systems on IBM PCs and most compatibles.  HDTEST may, however, be
  490.           forced to use the (somewhat more limiting) DOS device interface when
  491.           used with non-bootable hard disks and/or with hard disks which require
  492.           special device drivers to be installed, and will be forced to use the
  493.           DOS device interface when dealing with disks partitioned by means
  494.           other that the DOS 3.3 (and above) utilities.
  495.  
  496.           Earlier V4.xx releases of HDCHEK and HDTEST would abort if run on
  497.           small (<= 10 Mb) hard disks which had been patched to use a cluster
  498.           size smaller than the DOS standard (and 16-bit FATs). This deficiency
  499.           has been corrected in the current version, but very small (less than
  500.           1024 clusters) partitions may still cause problems if 16-bit FATs are
  501.           used (there is no good reason why such partitions should use 16-bit
  502.           FATs).
  503.  
  504.           If run under DOS 3.0 or above on an IBM INT 13 compatible hard disk,
  505.           The HD programs attempt to locate and use the ROM BIOS INT 13 entry
  506.           point, rather than the normal INT 13 vector (which DOS 3.x intercepts
  507.           
  508.           
  509.                                           Page 7 
  510.            
  511.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  512.           
  513.           
  514.           and interferes with). By default, for machines with 8088, 8086, 80188,
  515.           80186, or equivalent CPUs the programs assume that, if a ROM is                                                              ___________
  516.           present at absolute address C8000H, it contains the hard disk BIOS and          _______                                                            ___
  517.           has initialization code starting at offset 3. This assumption is true
  518.           for all hard disks which "plug in" to the IBM PC and XT. It may not be
  519.           true for all clones which come with hard disks installed, although it
  520.           is likely to be true for most of them. Also by default, the programs
  521.           assume that the hard disk BIOS in systems with 80286 or 80386
  522.           processors is in the "system" ROM at absolute address F0000H, but
  523.           make no more specific assumptions about its location. Problems (up to               __                                                              
  524.           and including system halts) may occur if none of the special flags is
  525.           set and your system is configured in a way that is not consistent with
  526.           these assumptions. They are almost guaranteed for PC or XT systems if
  527.           the initialization code does not start at offset 3 in the ROM. If you
  528.           know that your hard disk ROM is located somewhere other than at the
  529.           default segment address and/or does not obey the "rules", you can use
  530.           the /H flag to tell the programs where to look for it. Unless you know
  531.           that your system is particularly non-IBM-compatible, however, it is
  532.           usually worth trying to run the HD programs in their default mode
  533.           first. Problem hardware should respond to one of the approaches
  534.           described in the "Using the On-Disk Preboot" section of this
  535.           documentation. The use of all the command line flags is discussed in
  536.           more detail below.
  537.  
  538.           Note that, since HDTEST remaps bad clusters to free space, there is
  539.           not much point in running it on a disk which has none (as shown by DIR
  540.           or CHKDSK), since the program will abort immediately if it finds a bad
  541.           cluster.  Unless you have a really flaky disk, however, you should not
  542.           need more than a couple of hundred Kb free to remap any reasonably
  543.           probable number of bad clusters.
  544.  
  545.           This version of the HD programs does not require an ANSI console
  546.           driver (such as ANSI.SYS) to be loaded. The programs will, however,
  547.           continue to function correctly if such a driver is present.
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.           
  572.           
  573.                                           Page 8 
  574.            
  575.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  576.           
  577.           
  578.                                LIMITATIONS AND RESTRICTIONS                               ____________________________
  579.  
  580.           The current version of HDTEST still has a few (mainly theoretical)
  581.           limitations, most of which result from the way data is stored
  582.           internally by the program. None of them are "etched in stone",
  583.           although some could only be avoided at the cost of slowing down what
  584.           is already (and necessarily) far from a fast program. The known
  585.           limitations are as follows:
  586.  
  587.           1) Maximum cluster size = 65,528 bytes. I do not believe that a DOS
  588.           disk can ever have clusters larger than 64 Kb, but my limit is a few
  589.           less than that and may, since sector and cluster sizes tend to run in
  590.           powers of 2, effectively limit cluster size to 32 Kb - this should be
  591.           enough for most people!.
  592.  
  593.           2) DOS 4.0 and Compaq DOS 3.31 allow larger FATs than previous
  594.           versions of DOS (the FAT may be up to 128 Kbytes in extent, compared
  595.           with 64 Kbytes in previous DOS versions) Compaq DOS is not yet using                                                                         _____
  596.           FATs of this size, except on very large devices, but IBM/MS-DOS
  597.           creates FATs greater than 64Kb in extent on all partitions bigger than
  598.           about 66Mb. This version of the HDTEST package cannot handle
  599.           partitions with FATs larger than 64 Kbytes (128 sectors) in extent.
  600.           The Registered version of the package can handle devices up to the
  601.           current DOS size limit (512 Mb).
  602.  
  603.           3) Because of certain limitations of the chips used to support direct
  604.           memory access (DMA, the method used to transfer data from disk to
  605.           memory and vice versa) in the IBM PC and most clones and compatibles,
  606.           HDTEST may be unable to use available memory efficiently when cluster
  607.           sizes (and the buffers needed to hold them) are large. This
  608.           inefficiency can result in "Insufficient Memory" or "Memory
  609.           Allocation" errors, even on systems with more than the minimum 320 Kb
  610.           of free memory prescribed above. The only cure for this is to free up
  611.           (or buy!) more memory (remove RAMdisks, remove resident software,
  612.           etc.).
  613.  
  614.           4) The current version of HDTEST will run, in its default mode, on ATs
  615.           and most AT clones, but may not be able to detect corrected ECC errors
  616.           when run in that mode on some of the clones - a warning message will
  617.           be displayed when the program initializes itself if corrected ECC
  618.           errors are not being detected. Appropriate use of the extended form of
  619.           the /H flag or the /U flag, as described in the "Using the On-Disk
  620.           Preboot" section of this documentation, will allow detection of
  621.           corrected ECC errors on almost all hardware. The program will not                                                                        ___
  622.           detect corrected ECC errors when invoked with the /I flag (under DOS
  623.           3.0 or above) or with the /D flag.
  624.  
  625.           5) For reasons which are poorly understood (at least by the author!),
  626.           HDTEST runs very slowly on Epson Equity II systems, particularly when                      ____                                                     
  627.           used to test "plug-in" hard drives of the "Hardcard" or "Flashcard"
  628.           variety. For this hardware, the estimated run times given elsewhere in
  629.           the documentation need to be multiplied by about 2.5. There is some                                       __________          ___               
  630.           reason to think that this problem may be related to an excessively
  631.           "optimistic" interleave setting on (at least) some of these systems.
  632.  
  633.  
  634.  
  635.           
  636.           
  637.                                           Page 9 
  638.            
  639.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  640.           
  641.           
  642.                                    RUNNING THE PROGRAMS                                   ____________________
  643.  
  644.           Always run HDCHEK on any new hardware/software configuration before          ______                                                             
  645.           you attempt to run HDTEST (at least the first time). The latter
  646.           program has been written as conservatively as possible, but it is not
  647.           possible to predict the behavior of every conceivable combination of
  648.           hardware and operating system when dealing with a program which
  649.           bypasses most of the controls which normally protect the user from
  650.           destroying his world. HDCHEK is invoked with the command line:
  651.  
  652.           HDCHEK device [/A] [/Cn | /CQ] [/D | /I | /U] [/Hnnnn[:nnnn] [/M]
  653.  
  654.           "device" is the device to be tested (e.g. A:, B:, etc. - the colons
  655.           are permitted but not required). For versions of HDCHEK from V4.35,                            ___                                              
  656.           the spaces between the device identifier and the flags (and between
  657.           different flags) are optional - the command lines "HDCHEK C:/C2/D" and
  658.           "HDCHEK C: /C2 /D" are equivalent.
  659.  
  660.           The /A(T) flag is used to tell the HD program that it is being run on
  661.           an IBM AT. Setting the /A flag allows the programs to deal correctly
  662.           with a known bug in the IBM AT floppy disk controller BIOS when HDTEST
  663.           is used on 1.2 Mb "AT format" 5.25" floppy disks. If the /A flag is
  664.           set and the CPU is not an 80286 or better, you will be asked to
  665.           confirm that you wish to use AT defaults (HD BIOS at F0000H).
  666.  
  667.           N.B. the definition of the /A flag changed (slightly) at V4.71 - it          ___________________________________________________________________
  668.           need now only be used if you are testing a 1.2 Mb floppy disk on a          __________________________________________________________________
  669.           "vanilla" IBM AT. It may still be used to change the default BIOS          _________________________________________________________________
  670.           segment to F0000H on a PC or XT class machine, but the use of the /H          ____________________________________________________________________
  671.           flag for this purpose is preferred.          ___________________________________
  672.  
  673.           The /C flag has two variants. It is used, immediately followed by a
  674.           single decimal digit ("n") in systems which do not support IBM's
  675.           INT 11 "equipment determination" BIOS function (e.g. the Tandy 2000).
  676.           The parameter ("n") is the number of floppy drives attached to the
  677.           system, which would otherwise be determined by the program, using INT
  678.           11. The second variant should be used on Compaq computers - here, the
  679.           flag is followed by a "Q", instead of a number. This variant enables
  680.           large device support (as for IBM DOS 4.00) under Compaq DOS 3.31.
  681.  
  682.           The /D(OS interrupts) flag forces HDCHEK to use the hardware-
  683.           independent DOS interrupt 25 for access to the target device. It is
  684.           usually not required, since the program is usually smart enough to          _______                                    _______                
  685.           recognize devices which have to be accessed this way (e.g. logical
  686.           disk partitions other than those created as DOS 3.3 (and above)
  687.           "Extended Devices", non-bootable hard disks, some removable-media hard
  688.           disks). If the /D flag is not used, the program will issue a warning                                    ___                                       
  689.           message if it finds it has to use the DOS interrupts.
  690.  
  691.           N.B. the definition of the /D flag changed at V4.00 - the new /I flag          _____________________________________________________________________
  692.           has the same effect as the old (pre-V4.00) /D flag. Only one of these          _____________________________________________________________________
  693.           flags may be present on the command line.          _________________________________________
  694.  
  695.           The /I(nterrupt 13) flag has no effect under DOS 2.x.  Under DOS 3.0
  696.           or above, it forces HDCHEK to use the existing INT 13 vector (which it
  697.           always does under DOS 2.x), and prevents the program from trying to
  698.           determine the ROM BIOS entry point; the flag should be used if you
  699.           
  700.           
  701.                                          Page 10 
  702.            
  703.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  704.           
  705.           
  706.           know that your system's fixed disk BIOS uses INT 13 but does not
  707.           follow IBM's "rules" or if the program crashes the system when invoked
  708.           without it.
  709.  
  710.           The /H(ex BIOS address) flag is normally used (with a single numeric
  711.           argument) to tell the HD programs that the ROM BIOS of the device
  712.           being tested is located at nnnn, which is interpreted as a Hexadecimal
  713.           segment address, rather than at C800, which is the default for PC and
  714.           XT class machines, or F000, which is the default for systems using a
  715.           80286 or better CPU. There must be no space between the H and the
  716.           number. The extended form of the /H flag (e.g. /HF000:80D5) forces the
  717.           HD programs to use the given address as the ROM BIOS INT 13 entry                                               ____________________________
  718.           point. Its use is documented in more detail in the "Using the On-Disk          _____                                                                
  719.           Preboot" section of this documentation.
  720.  
  721.           The /M(ulti-track read problem) flag forces HDCHEK to split up disk
  722.           accesses that would otherwise require the BIOS to read data from more
  723.           than one track in a single "bite". Its use is documented in more
  724.           detail in the "Using the On-Disk Preboot" section of this
  725.           documentation.
  726.  
  727.           The /U(se INT 68) flag forces the HD programs to use the existing INT
  728.           68 vector (which must have been set up to point to an appropriate
  729.           location!) instead of locating and using the INT 13 BIOS entry point.
  730.           The use of this flag is documented in more detail in the "Using the
  731.           On-Disk Preboot" section of this documentation.
  732.  
  733.           After a short delay, during most of which the specified device will be
  734.           active, a description of the device's logical structure will be disp-
  735.           layed.  After a further delay, and more disk activity, a message will
  736.           be printed giving the number of files and subdirectories found on the
  737.           disk, and the program will exit back to DOS. Note that the total
  738.           number of files and subdirectories reported by HDCHEK will be greater
  739.           than the sum of the counts reported by CHKDSK. This is because HDCHEK
  740.           counts the "." and ".." entries in subdirectories and CHKDSK doesn't.
  741.  
  742.           Errors and/or problems encountered, if any, will be reported on in
  743.           some detail. A number of example screen displays and log files
  744.           produced by running HDCHEK (and HDTEST) on different systems will be
  745.           found in Appendix C at the end of this documentation. If HDCHEK tells
  746.           you that you have a bad 8088 chip, believe it - some early 8088s had a
  747.           bug which allowed them to be interrupted while changing their stack
  748.           frame*  - this is not benign, and can cause all sorts of rare,
  749.           otherwise almost inexplicable, problems. The only cure is to replace
  750.           the CPU (which is, fortunately, not a particularly expensive
  751.           proposition these days). If HDCHEK reports a discrepancy between the
  752.           two FATs, HDTEST will abort. The FIXFAT program (also in the package)
  753.           may be able to correct this problem - see FIXFAT.DOC.
  754.  
  755.  
  756.           _____________________________________________________________________
  757.  
  758.           * See "Chips in Transition", by Bob Smith. PC Tech J. 4:4 (Apr. 1986):                                                     __________                 
  759.           56-69. The code which the HD programs use to identify the CPU and
  760.           diagnose this problem is adapted from the CPUID program described in
  761.           this article and includes code from subsequent, related, articles in
  762.           that magazine.
  763.           
  764.           
  765.                                          Page 11 
  766.            
  767.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  768.           
  769.           
  770.           Always run the DOS CHKDSK program immediately before running
  771.           HDTEST on a disk. If CHKDSK reports any problems, its /F option (or
  772.           other means) should be used to correct them before HDTEST is run.                                                      ____________________ 
  773.  
  774.  
  775.           HDTEST is invoked with the command line:
  776.  
  777.                HDTEST device1 [device2[:pathname]] [optional parameters]
  778.  
  779.           "optional parameters" may include one or more of the following:
  780.  
  781.           [/A] [/B] [/Cn | /CQ] [/D | /I | /U] [/F] [/G[V]] [/Hnnnn[:nnnn]] [/M]
  782.           [/N] [/P] [/R[n]] [/Snnnnn] [/U] [/X] [/Yn] [/Z[n]]
  783.  
  784.           "device1" is the name of the device to be tested, as for HDCHEK.
  785.           "device2" (which, if present, must be different from "device1") is the
  786.           name of a device on which a log file is to be written. If only a
  787.           device name (with or without a colon) is specified for the log file,
  788.           a file called HDTESTdn.LOG will be written to the default directory on
  789.           the specified device. "d" in this file specification is replaced by
  790.           the single-character specifier of the device being tested, while "n"
  791.           is replaced by the lowest decimal digit which results in the creation
  792.           of a new file (previous log files will not be overwritten). If all ten               ___                               ___                            
  793.           possible log file names for this test device have already been used,
  794.           the program will prompt for a new name. If a directory path (ending in
  795.           a backslash (\)) is specified as device2, HDTESTdn.LOG will be created
  796.           in the specified directory. If a full pathname is specified (not                                                                       ___
  797.           ending in a backslash), a file with that pathname will be opened as
  798.           the log file. In this case (only), any pre-existing file of the same
  799.           name will be overwritten. If "device2" is not specified, errors are
  800.           reported to the console terminal. The DOS console redirection facility
  801.           should not be used to redirect them elsewhere.                 ___                                    
  802.  
  803.           For versions of HDTEST from V4.35, the spaces between the device
  804.           identifier and the flags (and between different flags) are optional -
  805.           the command lines "HDTEST C:/A/F" and "HDTEST C: /A /F" are
  806.           equivalent.
  807.  
  808.           The /A, /C, /D, /H, /I, /M, and /U flags have the same meaning and
  809.           effect that they do for HDCHEK. When used for HDTEST, the /D flag
  810.           forces the use of INT 25 to read from and INT 26 to write to the
  811.           target disk.
  812.  
  813.           The /B(oot/Partition sector test) flag forces the program to include
  814.           the boot/partition sector (track 0, head 0, sector 1) in the DOS area
  815.           for the purposes of read/write testing. The default action is only to
  816.           perform read and seek tests on this sector, even if read/write testing
  817.           of the DOS area is specified. Since the boot/partition sector is
  818.           effectively read-only under normal circumstances (it is only written                                                                       _______
  819.           to during low-level formatting, and by FDISK and other disk          __                                                         
  820.           partitioning programs), read/write testing is less vital than for the
  821.           rest of the disk. In addition, at least one hard disk controller (a
  822.           Western Digital board which allows a single disk to be addressed as
  823.           two "physical" devices) will not allow test patterns to be written to
  824.           this sector. Certain devices (chiefly RAMdisks) appear to DOS to be
  825.           hard disks but do not, in fact, possess boot/partition sectors. On
  826.           these devices, HDTEST will report check/test results on the
  827.           
  828.           
  829.                                          Page 12 
  830.            
  831.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  832.           
  833.           
  834.           boot/partition sector while actually reading/writing the device's boot
  835.           sector - the latter sector will simply end up being checked/tested
  836.           twice under these circumstances.
  837.  
  838.           The /F(ast mode) flag causes the program to use only two test patterns
  839.           (all 1s and all 0s) for read/write testing. It is intended for use on
  840.           floppy disks and for "quick and dirty" testing of other devices.
  841.  
  842.           The /G(ive error details) flag causes the program to determine the
  843.           location of errors occurring during testing of the disk's data area
  844.           at the sector level (they are normally handled at the cluster level),
  845.           and to report on the location of all bad sectors found. The report is
  846.           written to the log device or file after all testing is finished. By                                            _____________________________    
  847.           default, only an error code is given for each bad sector - if a V (for
  848.           "verbose"!) is appended to the flag, the error code is expanded to a
  849.           report similar to that given for each bad cluster. This flag is
  850.           ineffective (and ignored) if HDTEST is using DOS interrupts, either
  851.           because the /D flag was set or because the program was not able to
  852.           access the disk at the BIOS level.
  853.  
  854.           The /N(o Query) flag disables the individual prompts for confirmation
  855.           which the program normally issues before remapping clusters which are
  856.           marked as "Reserved" or which are part of a file which is marked as
  857.           "System", "Hidden", or "Readonly".  The /N flag does not prevent the                                                               ___            
  858.           program from prompting for confirmation before updating the disk.
  859.  
  860.           The /P(rint) flag causes the log file to be directed to the PRN device
  861.           (normally LPT1), and overrides any "device2" specification.
  862.  
  863.           The /R(epeat)n flag causes HDTEST to go through n complete testing
  864.           cycles. Omitting n, or setting it to zero, causes HDTEST to run
  865.           continuously until terminated by pressing <Esc>). Instead of stopping
  866.           after completing the testing of allocated data clusters, the program
  867.           immediately starts again with the DOS area. Any bad clusters found and
  868.           flagged in the first pass should be reported as "already marked as
  869.           bad" in subsequent passes. The /R flag implicitly sets the /N flag.
  870.  
  871.           The /S(tart)nnnnn flag causes HDTEST to start testing occupied                                                                ________
  872.           clusters at cluster number nnnnn (expressed as a decimal number).                                                           _______         
  873.           There must be no space between the "S" and the number. This option
  874.           will mainly be useful when a previous run of HDTEST was interrupted
  875.           (by pressing <Esc>), since it allows you to start where you left off.
  876.           Note that, in order to be sure that data is not remapped to a bad
  877.           area, HDTEST always tests all empty clusters before starting to test                       ______       ___                                       
  878.           occupied clusters. For this reason, using the /S flag will not result
  879.           in a large time saving if your disk is nearly empty, and it will make
  880.           the most difference on a full, or nearly full, disk.
  881.  
  882.           The /Y(es, please remap)n flag causes HDTEST to remap up to n (a
  883.           decimal number) bad clusters without prompting for confirmation. It is
  884.           effective only if HDTEST is allowed to run to completion, and is
  885.           intended to allow the program to be run unattended on multiple disks
  886.           from a .BAT file. If more than n bad clusters are found or if the
  887.           program is aborted (by pressing <Esc>), the normal prompt for
  888.           confirmation is issued before any bad clusters are remapped. See
  889.           "Running HDTEST from a .BAT file".
  890.  
  891.           
  892.           
  893.                                          Page 13 
  894.            
  895.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  896.           
  897.           
  898.           The /X(clude bad clusters) flag causes HDTEST not to test clusters                                                        ___                 
  899.           that are already marked as bad by FORMAT or previous runs of HDTEST
  900.           (the default is to test all clusters every time the program is run).                                  ___                                         
  901.           This saves some time when testing a disk with a substantial number of
  902.           known defects. The marked clusters will be reported as bad but will
  903.           not be retested. The /X flag overrides the /G flag for previously
  904.           marked clusters - no bad sector report will appear for these clusters
  905.           if both flags are used.
  906.  
  907.           The /Z(ero bad sectors)n flag controls how HDTEST deals with sectors
  908.           that could not be read correctly (due to unrecoverable read errors)
  909.           when it remaps bad clusters. Versions of HDTEST up to and including
  910.           V4.10 (somewhat cavalierly) disregarded the remaining contents of the
  911.           entire cluster if one or more sectors in it were unreadable, and
  912.           remapped it to a cluster of NULLs. The default action is now to
  913.           replace only the unreadable sector(s) with NULLs, transferring the                                      _________                             
  914.           remaining sectors intact to the remapped cluster. There are, however,
  915.           two other options, which can be chosen by setting n to 0 or 2 (if n is
  916.           omitted, 1, or any other number, the default action is taken). Setting
  917.           n to 0 uses the old default (remaps the bad cluster to a cluster of                          ___                                      _______   
  918.           NULLs), while setting n to 2 goes to the other extreme and copies all
  919.           data read (some of which is almost certainly invalid) to the remapped
  920.           cluster. It is always safe and often advisable to use the /Z2 option
  921.           provided that you do not try to use any non-ASCII files that have been          ______________________________________________________________________
  922.           remapped with unrecovered read errors and this (/Z) option. Remapped          ___________________________________________________________         
  923.           ASCII files can be inspected with an editor and fixed up where
  924.           necessary - non-ASCII files (e.g. .EXE, .COM, .WKS files) may appear
  925.           to be undamaged (the program may run, the worksheet be readable, etc.)
  926.           but they can still contain small changes which will cause trouble
  927.           later, and they cannot easily be checked. The large "holes" which /Z
  928.           options 0 and 1 leave in such files usually allows it to be much more
  929.           obvious that they are defective!
  930.  
  931.           After displaying its copyright message, HDTEST reads the FATs and
  932.           scans the root directory and all subdirectory trees of the specified
  933.           device before initiating a short dialogue. All questions are of the
  934.           "Yes/No" type and should be answered by typing "Y" or "N" (case does
  935.           not matter) and pressing the <Return> key.  Pressing the <Return> key
  936.           alone is equivalent to giving the default response (which appears in
  937.           square brackets at the end of each prompt).  HDTEST then proceeds to
  938.           test the specified device. By default, the DOS area (boot sector,
  939.           FATs, and root directory) is not subjected to Read/Write testing,
  940.           since failures in this area usually make themselves apparent fairly
  941.           rapidly. The user can, however, choose to run these tests on the DOS
  942.           area too, or to limit testing to read and seek tests only over the
  943.           whole partition.
  944.  
  945.           In its reports to the screen, HDTEST uses the convention that read-
  946.           only testing is "Checking" while read/write testing is "Testing" - it
  947.           always "checks" the boot/partition sector and the rest of the DOS
  948.           area, but only "tests" them if requested to do so.
  949.  
  950.           In "checking" or "testing" a block (sector or cluster), HDTEST first
  951.           reads it (retrying, if necessary, up to five times) and then does the
  952.           longest possible seek away from it before attempting to read it again.
  953.           "Checking" is complete at this point. "Testing" continues with the
  954.           program sequentially writing 20 (or 2, for "fast mode") different bit
  955.           
  956.           
  957.                                          Page 14 
  958.            
  959.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  960.           
  961.           
  962.           patterns to the block and checking that each one can be read
  963.           correctly, before rewriting the original contents of the block (and
  964.           reading it again to ensure that it has been restored correctly).
  965.           Errors that occur at any point in this process are reported and (if
  966.           the block is in the data area - errors in the DOS area are always
  967.           treated as fatal) the block is remapped. If an error is detected in a
  968.           "Reserved" cluster or in one that is part of a file which is marked as
  969.           "System", "Hidden", or "Readonly", the user is normally asked for
  970.           confirmation before the cluster is remapped, otherwise it is assumed
  971.           that remapping is desired.
  972.  
  973.           HDTEST keeps a copy of the FAT and a map of the device's directory
  974.           structure in memory. A bad cluster is remapped by transferring its
  975.           contents to a free cluster and (if the bad cluster was in use)
  976.           changing all necessary FAT and directory entries in memory so that the
  977.           pointer chain which maintains the structure of the affected file or
  978.           subdirectory remains valid. The bad cluster's FAT entry is then
  979.           altered to identify it as bad to DOS. The device's FATs and                                                    ________         
  980.           directories are not altered until the whole device has been scanned,
  981.           and then only after the user has confirmed that it is OK to proceed.
  982.           This means that a power failure and/or an inadvertent power-off which
  983.           occurs while the program is running will cause the loss of, at most,
  984.           one cluster of data and of no FAT or root directory information
  985.           (unless you are very unlucky and it happens after you have confirmed                          ____                                                
  986.           that you want a damaged data area to be remapped and while this is
  987.           being done). If a power failure and/or power-off occurs while a
  988.           cluster which contains the directory information of a subdirectory is
  989.           being tested, part or all of that subdirectory will probably become
  990.           inaccessible to DOS, although the data in it will remain on the disk
  991.           and be potentially recoverable with the aid of (e.g.) the Norton
  992.           Utilities (TM).
  993.  
  994.           You can safely interrupt the testing process part way through (by
  995.           pressing the <Esc> key) with no risk of leaving a partially updated
  996.           FAT or directory. If you do interrupt the program in this way, you
  997.           will be given the option of updating the disk, so that bad clusters
  998.           which were detected before <Esc> was pressed can be remapped.
  999.  
  1000.           Errors which occur in the program's initialization phase cause it to
  1001.           abort with an error message and (sometimes) a hexadecimal error code.
  1002.           The meaning of the error code is context-dependent and it is useful
  1003.           only to technical support personnel. Errors detected during read-write
  1004.           testing only cause the program to abort if they occur during testing
  1005.           of the DOS area, or if remapping is impossible (only likely to happen
  1006.           if the disk is full). In any event, a description of the error is
  1007.           written to the log file (if any) and/or to the screen. This specifies
  1008.           the cluster or (for the DOS area) sector number and the name of the
  1009.           affected file (if any), and defines the type(s) of error which
  1010.           occurred. Appendix B contains a discussion of some of the more
  1011.           technical aspects of data storage on disks (floppy and hard), and
  1012.           includes more information about some of the possible errors that may
  1013.           be encountered.
  1014.  
  1015.           HDTEST takes a very long time to run to completion because of the                         ____                                              
  1016.           large number of reads and writes it does for each cluster. A typical
  1017.           time for full testing ("slow" mode) of an XT disk (10 Mb) would be 2
  1018.           hrs; full disk testing on a 30 Mb Enhanced AT takes at least 4 hrs.
  1019.           
  1020.           
  1021.                                          Page 15 
  1022.            
  1023.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1024.           
  1025.           
  1026.           Note also that using the /D or /G flags will substantially slow down
  1027.           the testing of disks with significant numbers of bad spots. Using
  1028.           the /X flag as well will allow the physical location of new defects to
  1029.           be reported without requiring that known bad areas be exhaustively
  1030.           retested.
  1031.  
  1032.  
  1033.                                 USING THE ON-DISK PRE-BOOT                                __________________________
  1034.  
  1035.           All IBM systems (at least non-PS/2 ones - I have little experience,
  1036.           yet, with the new line of IBM hardware) - and almost all clones
  1037.           capable of running IBM PC-DOS (rather than "generic" MS-DOS) should
  1038.           also run the HD programs with no problems, and should allow them to
  1039.           locate and use the ROM BIOS INT 13 entry point with no help from the
  1040.           user. Less compatible systems have presented more problems in the
  1041.           past, but this version of HDTEST is distributed with a supplemental
  1042.           program (BOOTLOAD) which can be used to modify the boot sector on a
  1043.           floppy disk and create a special pre-boot floppy to allow
  1044.           identification and use of the "real" INT 13 entry point on almost any
  1045.           MS-DOS-compatible system. Once created by BOOTLOAD, the special boot
  1046.           sector will be correctly duplicated if copy the disk by using the DOS                 ____                                                          
  1047.           "DISKCOPY" command - it will not be copied by a "COPY *.*" command.                                       ___                                   
  1048.           Further documentation for the BOOTLOAD program (BOOTLOAD.DOC) should
  1049.           have been included in this package.
  1050.  
  1051.           After using BOOTLOAD to create the special pre-boot disk, insert it in
  1052.           the boot drive (normally drive A), then (re)boot your system as you
  1053.           normally do (either by switching it on or by pressing the <Ctrl>-
  1054.           <Alt>-<Del> combination or its equivalent for your hardware). After
  1055.           performing its self-test, the system's BIOS will load and pass control
  1056.           to the code on the boot sector of the floppy. On a normally FORMATTed
  1057.           floppy disk, this code attempts to locate the MS-DOS system files at
  1058.           the beginning of the disk's root directory and to load and execute
  1059.           them. The HDTEST boot disk will not load DOS (even if you SYS the
  1060.           disk) - it simply reads and reports on the contents of the INT 13
  1061.           vector (which DOS has not yet had a chance to tamper with, since it
  1062.           has not been loaded) and conditionally transfers the vector to the INT
  1063.           68 location. The INT 68 location is normally unused in MS-DOS systems
  1064.           - it is defined that way by IBM - and is usually loaded either with
  1065.           zeroes or with a pointer to some "do-nothing" code by the BIOS
  1066.           bootstrap. The HD programs use it for the "real" INT 13 vector,
  1067.           normally saving the original contents of the location on entry and
  1068.           restoring them on exit. This behavior is modified by specifying the /U
  1069.           switch on the command line. The HDTEST boot sector code will only
  1070.           transfer the "real" INT 13 BIOS entry point to the INT 68 location if
  1071.           the latter contains either zeroes or the same vector as INT 69. In the                              ______        __                                  
  1072.           latter case (since there is no point in having two "real" interrupt
  1073.           vectors pointing at the same place), it is assumed that both are
  1074.           pointing at "do-nothing" code. If the INT 68 vector is neither 0:0 nor                                                                 _______     ___
  1075.           the same as the INT 69 vector, the preboot code will leave it alone
  1076.           and report that the INT 13 vector was not transferred, otherwise it
  1077.           will confirm that the transfer has taken place - in any event, you
  1078.           will be given an opportunity to write down the vector and can then
  1079.           remove the disk and press a key to allow the boot process to complete.
  1080.           If you need to boot from a floppy disk, for some reason, a new,
  1081.           bootable, disk can be inserted before you press the key to continue.
  1082.  
  1083.           
  1084.           
  1085.                                          Page 16 
  1086.            
  1087.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1088.           
  1089.           
  1090.           If the preboot reported that the INT 13 vector was successfully
  1091.           transferred, you should simply specify the /U flag on the HDTEST or
  1092.           HDCHEK command line, in addition to the "short" form of the /H flag                               ______________                                
  1093.           (if the BIOS ROM is at an unusual location for the class of machine).
  1094.           The requirement for the /H flag with unusual hardware allows the
  1095.           program to do some additional "reasonableness checking". Unless some
  1096.           other software interferes with it, the INT 68 vector will then
  1097.           continue to be set up correctly for use by the HD programs until the
  1098.           system is switched off or rebooted.
  1099.  
  1100.           If the preboot was not able to transfer the vector, or if you know
  1101.           that a device driver or resident program loaded by your DOS uses INT
  1102.           68, you should invoke the HD programs with the "long" form of the /H
  1103.           flag, specifying the full address displayed by the preboot. No error
  1104.           checking is attempted in this case - if you mistype the address, the
  1105.           first time the program attempts to access the disk, it will jump to a
  1106.           (effectively) random location in ROM, with potentially disastrous
  1107.           results. If it is feasible, use of the pre-boot disk and the /U flag
  1108.           is preferable (in terms of safety, if for no other reason) to that of
  1109.           the "long" form of /H.
  1110.  
  1111.           The following example may help to clarify matters. You have a clone
  1112.           system with a BIOS ROM location that is non-standard. The HDTEST boot
  1113.           disk reports that the INT 13 entry point is at E000:13AC, and that the
  1114.           vector has been successfully transferred. You may now run HDTEST with
  1115.           the command line:
  1116.  
  1117.           HDTEST C: A: /U /HE000                            ____
  1118.  
  1119.           You may also, now or later, with or without prior use of the pre-boot,                                      _______________                           
  1120.           run HDTEST with the command line:
  1121.  
  1122.           HDTEST C: A: /HE000:13AC                         _________
  1123.  
  1124.           Note that the /H flag is not needed with the /U flag if the segment                                   ___                                       
  1125.           address of the hard disk BIOS is the usual value for the system type                                                           ___________________
  1126.           (as determined by the processor). For a system based on an 8088, 8086,
  1127.           80188, or 80186 processor, this "usual" value is C800. For all other
  1128.           systems, the "usual" value is F000.
  1129.  
  1130.           One further problem may be encountered - certain hard disk BIOSes do
  1131.           not exactly comply with IBM standards in dealing with disk accesses
  1132.           that cross track boundaries, and will produce frequent errors when
  1133.           such accesses are attempted. It was this "multi-track read" problem
  1134.           which resulted in a number of previously apparently 99.99% IBM-
  1135.           compatible systems failing to run IBM PC-DOS 3.3 (which was the first
  1136.           version of DOS actually to attempt such accesses). IBM issued a "fix"
  1137.           for this problem, in the form of a program which, when run on the
  1138.           "bad" system, creates a device driver which protects the BIOS from
  1139.           being asked to do something that it can't. This device driver does its
  1140.           job by intercepting INT 13, and will, of course, do nothing to help
  1141.           the HD programs if they are bypassing that interrupt. Use the /M flag
  1142.           with the HD programs if you have a system on which PC-DOS 3.3 or above
  1143.           will not run without being "fixed" as described. It forces the
  1144.           programs to split up the multi-track accesses into manageable chunks -
  1145.           this can be expected to cause a substantial slowing of the programs'
  1146.           operation.
  1147.           
  1148.           
  1149.                                          Page 17 
  1150.            
  1151.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1152.           
  1153.           
  1154.                                  DEALING WITH BAD CLUSTERS                                 _________________________
  1155.  
  1156.           It is not unusual for a new hard disk to have a small, constant,                                                          _____  ________ 
  1157.           number of bad clusters. IBM's quality control standards allow, for
  1158.           example, 5% of the surface area of a disk to be bad (!). These pre-
  1159.           existing bad clusters, which correspond to imperfections in the
  1160.           magnetic coating on the disk, will normally be detected and marked by
  1161.           the DOS FORMAT program, and HDTEST will report them as "already marked
  1162.           as bad". This should not be regarded as evidence of any real problem
  1163.           with the disk, although some suppliers (not including IBM) will                                                  ___                    
  1164.           replace such disks under warranty if pressed to do so. It is also not
  1165.           unusual for a disk to develop a few more defects as it ages. When                                          ___                              
  1166.           these do develop, they are also subsequently constant in size and
  1167.           position, and will be reported as "already marked as bad" by HDTEST on
  1168.           runs subsequent to that during which they are first found. The
  1169.           occasional appearance (and subsequent persistence) of a new bad          __________                                                     
  1170.           cluster is, therefore, not necessarily evidence of serious trouble
  1171.           developing.  However, if more than one or two new bad clusters are
  1172.           reported by HDTEST, and especially if two consecutive runs (or passes,
  1173.           if the /R flag is set) of HDTEST report different bad clusters, there                                                  _________                    
  1174.           is a good chance that the hard disk or controller is developing a
  1175.           serious problem - the disk should be backed up immediately and the
  1176.           disk and/or controller sent for repair at the earliest opportunity.
  1177.  
  1178.           New bad clusters in the data area are automatically mapped out by
  1179.           HDTEST, and no further action is necessary. Bad sectors in the DOS
  1180.           area can be handled in two ways:
  1181.  
  1182.           1) If you are able to do a low-level format on your hard disk (most                                     _________                               
  1183.           makers of "add-on" hard disks supply a method of doing this, either in
  1184.           the form of a short program, or by giving instructions for running a
  1185.           program in the ROM BIOS from DEBUG), back up the entire hard disk                                                           ______          
  1186.           (including any non-DOS partitions), run the low-level format, use
  1187.           FDISK to repartition the disk, and then run the DOS FORMAT program. If
  1188.           HDTEST now reports no errors in the DOS area you can restore all your
  1189.           files and continue to use the disk. You should, however, use HDTEST to
  1190.           test (at least) the DOS area fairly frequently for a month or so to be
  1191.           sure that the problems are not going to recur.
  1192.  
  1193.           2) If you do not have the means to do a low-level format, or if you
  1194.           follow the above instructions and HDTEST continues to report errors in
  1195.           the DOS area, your only other choice is to back up the DOS partition,
  1196.           reconfigure the disk with FDISK so that the new DOS partition starts
  1197.           above the bad area, reFORMAT it, and restore all of the old files to
  1198.           the new DOS partition (which will unavoidably be a little smaller than
  1199.           the old).
  1200.  
  1201.           If the hard disk's boot/partition sector (track 0, Head 0, sector 1)
  1202.           becomes bad, the disk is useless and must be replaced. This sector is
  1203.           only subjected to read/write testing if the /B flag is specified on                            __________                                       
  1204.           the command line, so any reported errors (in sector -1) during normal                                                              __               
  1205.           testing represent a problem reading the sector and are likely to be                                      _______                                
  1206.           significant. Problems encountered during read/write testing of this
  1207.           sector do not always indicate a significant problem - certain                    ___                                                
  1208.           controller cards may not allow test patterns to be written to it,
  1209.           resulting in a report of multiple errors on read/write testing.
  1210.           Consequently, if multiple errors are reported on read/write testing of
  1211.           
  1212.           
  1213.                                          Page 18 
  1214.            
  1215.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1216.           
  1217.           
  1218.           the boot/partition sector, but read-only testing proceeds without
  1219.           problems and the rest of the disk seems to be OK, there is probably no
  1220.           cause for concern.
  1221.  
  1222.  
  1223.                               RUNNING HDTEST FROM A .BAT FILE                              _______________________________
  1224.  
  1225.           Versions of HDTEST from V4.75 can be run from a .BAT file (e.g. for
  1226.           unattended testing of multiple disks) without the user losing the
  1227.           ability to "escape" cleanly from the program. The /Y flag also allows
  1228.           the user to specify a maximum number of new bad clusters for each disk
  1229.           to be remapped "automatically". By using this flag, you can arrange
  1230.           that the .BAT file will normally just keep going, but will pause and
  1231.           wait for input if something terrible seems to have happened to a disk.
  1232.           In order to run HDTEST from a .BAT file, it is necessary to prepare
  1233.           both the .BAT file with your usual HDTEST command lines, generally          ____                                                              
  1234.           including the /Y and /N flags, and a second ASCII file containing the                                         ___                                   
  1235.           answers to HDTEST's initial questions, one per line. DOS's input
  1236.           redirection ("<") command is used to "feed" these answers to HDTEST.
  1237.           If the "answer" file is called (e.g.) ANSWERS.TXT, each line in the
  1238.           .BAT file will look like:
  1239.  
  1240.               HDTEST dev1 dev2 /opt1 /opt2 <ANSWERS.TXT                                           ____________
  1241.  
  1242.           If you do not wish to read/write test the DOS area of the disk, your
  1243.           answer file can consist of three blank lines. If you do wish to                                                               __        
  1244.           read/write test the DOS area, the first line of the answer file can be
  1245.           blank, the next two must start with a "y" and the fourth can be blank.                          ___                                                   
  1246.           In order to allow HDTEST to be interrupted from the keyboard, if
  1247.           necessary, the program terminates input redirection before starting
  1248.           testing the disk, so anything in the answer file after the answers to                                                           _____               
  1249.           HDTEST's initial questions will be ignored.
  1250.  
  1251.           On exit, HDTEST now returns a meaningful ERRORLEVEL, which can be
  1252.           tested from a .BAT file by means of DOS's "IF ERRORLEVEL" syntax.
  1253.           Versions of the program prior to V4.81 returned an ERRORLEVEL of 1
  1254.           on aborts and 0 otherwise - HDCHEK still does this. The current
  1255.           version of HDTEST normally returns an ERRORLEVEL equal to the number
  1256.           of new bad clusters found. On aborts it returns 254, and, if
  1257.           deliberately terminated by the user (either by answering "N" to the
  1258.           last question in the introductory dialogue or by pressing and
  1259.           confirming <Esc> during testing), it returns 255.
  1260.  
  1261.           Note that this application of HDTEST is really intended for advanced
  1262.           users, and I am aware that this description is somewhat cursory - more
  1263.           help in using it can, if necessary, be obtained by Registered users
  1264.           directly from me.
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.           
  1276.           
  1277.                                          Page 19 
  1278.            
  1279.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1280.           
  1281.           
  1282.                             BUGS AND OTHER UNPLEASANT SUBJECTS                            __________________________________
  1283.  
  1284.           Although, like all programmers, I like to think that my product is
  1285.           perfect, it is possible that there are a few bugs lurking in the
  1286.           depths of the program, and likely that some combination of software
  1287.           and hardware exists which HDTEST cannot figure out and/or cope with.
  1288.           If you think you have found a bug and/or if you cannot get either of
  1289.           the programs to work on your system, do the following:
  1290.  
  1291.           1) Reread this documentation! Make sure that you are doing exactly
  1292.           what the documentation says to do. Make sure (if you are testing a
  1293.           drive with removable media) that the media is not write-protected.
  1294.  
  1295.           2) Boot your system from a "virgin" DOS disk - preferably a copy of
  1296.           your DOS distribution disk - and try to run the HD programs again. If
  1297.           they run in this environment but not in your normal DOS environment,
  1298.           try reconstructing the system under which they failed by adding things
  1299.           one by one until the problem recurs. If you find a specific piece of
  1300.           software which causes the trouble, let me know about the
  1301.           incompatibility.
  1302.  
  1303.           3) If the above approaches do not help, or if HDCHEK runs but HDTEST
  1304.           bombs (the reverse should never happen), send me as detailed a
  1305.           description of the problem as possible and I will do my best to
  1306.           diagnose and fix it. A bug report should always include a full                                                   ______               
  1307.           description of the system being used (hardware and software), as well                                                         ___                   
  1308.           as a copy of the output from a run of HDCHEK.
  1309.  
  1310.           I can be contacted by U.S. mail at the address given earlier in the
  1311.           documentation, by BIXMail to pfletcher, or by Compuserve EMail to
  1312.           72255,305.
  1313.  
  1314.  
  1315.                               CHANGES FROM PREVIOUS VERSIONS                              ______________________________
  1316.  
  1317.           The first version of the HD programs actually released (not including
  1318.           beta-test versions) was V2.60. The programs have grown and developed
  1319.           gradually, for the most part, but the pre-V4.65 releases listed below
  1320.           have constituted the most significant "watersheds" - features added
  1321.           and changes made between the listed releases are treated here as if                           _______                                           
  1322.           first included in the next listed release. Note that the V4.45                                ____                                    
  1323.           Shareware version of the program is not listed here - it was identical
  1324.           to V4.41 except that it included the "fix" for the deficiency which
  1325.           was corrected at V4.70 in the Registered version. Unless otherwise
  1326.           noted, both programs were affected by the listed changes.
  1327.  
  1328.  
  1329.           Version 4.84 (this version)          ____________               
  1330.  
  1331.           1) Minor change to reporting of initialization errors (HDCHEK).
  1332.  
  1333.  
  1334.           Version 4.83          ____________
  1335.  
  1336.           1) Remainder of fix for bug noted at V4.80!
  1337.  
  1338.  
  1339.           
  1340.           
  1341.                                          Page 20 
  1342.            
  1343.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1344.           
  1345.           
  1346.           Version 4.81          ____________
  1347.  
  1348.           1) Meaningful ERRORLEVEL returned on exit (see "Running HDTEST from a
  1349.           .BAT file) (HDTEST).
  1350.  
  1351.  
  1352.           Version 4.80          ____________
  1353.  
  1354.           1) Bug causing the programs to fail if a subdirectory were physically
  1355.           located beyond the 32 Mb boundary on a large (> 32 Mb) device
  1356.           partially located and corrected.
  1357.  
  1358.  
  1359.           Version 4.75          ____________
  1360.  
  1361.           1) Log file specification capabilities enhanced (HDTEST).
  1362.  
  1363.           2) /Y flag and .BAT file support added (HDTEST).
  1364.  
  1365.  
  1366.           Version 4.71          ____________
  1367.  
  1368.           1) Fully automatic setting of default ROM BIOS location by CPU type.
  1369.  
  1370.           2) Meaning of and requirement for /A flag modified.
  1371.  
  1372.  
  1373.           Version 4.70          ____________
  1374.  
  1375.           1) Deficiency causing "fallback" to DOS interrupt level under some
  1376.           circumstances when attempting to test "extended devices" on a second
  1377.           physical hard drive fixed. The Shareware V4.45 also included this
  1378.           "fix".
  1379.  
  1380.  
  1381.           Version 4.66          ____________
  1382.  
  1383.           1) Support for large devices under Compaq DOS 3.31 added (see
  1384.           description of /C flag).
  1385.  
  1386.  
  1387.           Version 4.65          ____________
  1388.  
  1389.           1) DOS 4.0 support added (including BIOS-level access to large
  1390.           partitions), but see notes on V4.8x.
  1391.  
  1392.           2) Minor changes made to final screen & file output format (HDTEST).
  1393.  
  1394.           3) Minor improvements made to memory allocation algorithms.
  1395.  
  1396.           4) /G option added (HDTEST).
  1397.  
  1398.           5) /X option added (HDTEST).
  1399.  
  1400.  
  1401.  
  1402.  
  1403.           
  1404.           
  1405.                                          Page 21 
  1406.            
  1407.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1408.           
  1409.           
  1410.           Version 4.54          ____________
  1411.  
  1412.           1) Deficiency in CPU recognition code (which caused fast AT clones
  1413.           sometimes not to appear to be ATs) fixed.                    ___                            
  1414.  
  1415.           2) ANSI.SYS requirement removed.
  1416.  
  1417.           3) Semi-automatic CPU recognition added.
  1418.  
  1419.           4) Pre-boot functionality, /M option, /U option, and extended
  1420.           (segment:offset) form of /H option added.
  1421.  
  1422.  
  1423.           Version 4.41          ____________
  1424.  
  1425.           1) Deficiency (introduced at V4.00) causing HDCHEK to issue an
  1426.           incorrect error report on an abort resulting from a FAT comparison
  1427.           error corrected.
  1428.  
  1429.           2) Minor deficiency, causing HDTEST to create an empty log file on the
  1430.           specified device when both a log device and the /P option were
  1431.           specified, corrected.
  1432.  
  1433.           3) Work-around for hardware multi-sector read ECC problem (see
  1434.           Appendix B) added (HDTEST).
  1435.  
  1436.           4) Support for small (<= 10 Mb) hard disks patched to have small
  1437.           clusters and 16-bit FATs added.
  1438.  
  1439.           5) Requirement that command line option flags be separated by one or
  1440.           more spaces or tabs removed.
  1441.  
  1442.           6) /R option added (to HDTEST) for multi-pass disk testing.
  1443.  
  1444.  
  1445.           Version 4.30          ____________
  1446.  
  1447.           1) Support for BIOS-level access to DOS 3.3 extended partitions added.
  1448.  
  1449.           2) /Z option added (to HDTEST) to control remapping of unreadable
  1450.           sectors in bad clusters.
  1451.  
  1452.  
  1453.           Version 4.10          ____________
  1454.  
  1455.           1) Assorted minor changes made to screen displays.
  1456.  
  1457.           2) /C option added to allow the programs to be used on some non-IBM
  1458.           compatible MS-DOS systems.
  1459.  
  1460.           3) /D option redefined - old /D option became new /I option.
  1461.  
  1462.           4) /F option added (to HDTEST).
  1463.  
  1464.           5) "Short" form of /H option added.
  1465.  
  1466.  
  1467.           
  1468.           
  1469.                                          Page 22 
  1470.            
  1471.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1472.           
  1473.           
  1474.           Version 3.13          ____________
  1475.  
  1476.           1) Assorted minor bugs and deficiencies in error reporting and
  1477.           termination routines fixed (HDTEST).
  1478.  
  1479.           2) Minor bug affecting reporting of multiple corrected ECC errors
  1480.           fixed (HDTEST).
  1481.  
  1482.           3) Disk reset added before retry on all errors (HDTEST).
  1483.  
  1484.           4) Absolute limit on number of files and directories on device
  1485.           removed.
  1486.  
  1487.           5) Display of total sector/cluster count during testing added
  1488.           (HDTEST).
  1489.  
  1490.           6) /A option added.
  1491.  
  1492.           7) /B option added (HDTEST).
  1493.  
  1494.  
  1495.           Version 2.73          ____________
  1496.  
  1497.           1) Bug (in V2.60) which could cause bad termination and possible
  1498.           subdirectory inconsistencies if a sector which was not in use was
  1499.           found to be bad, fixed (HDTEST).
  1500.  
  1501.           2) Bug (in V2.70) which caused HDTEST to enter a terminal input loop
  1502.           if ANSI.SYS was not loaded and <Esc> was entered to abort it, fixed.
  1503.  
  1504.           3) Minor bug in V2.60 (which resulted in a failed directory scan if
  1505.           the program was run on a write-protected device) fixed.
  1506.  
  1507.           4) Internal changes made to avoid interference with expanded memory
  1508.           device handlers.
  1509.  
  1510.           5) Ability to update disk after HDTEST terminated by user (typing
  1511.           <Esc>) added.
  1512.  
  1513.           6) /S option to start checking occupied clusters at a given cluster
  1514.           number added (HDTEST).
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.           
  1532.           
  1533.                                          Page 23 
  1534.            
  1535.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1536.           
  1537.           
  1538.                            APPENDIX A - SUMMARY OF FLAG SETTINGS                           _____________________________________
  1539.  
  1540.           /A(T) - used to tell the HD program that it is being run on an IBM AT
  1541.           (HDCHEK and HDTEST). /A is not equivalent to /HF000.
  1542.  
  1543.           /B(oot/Partition sector test) - used to include the hard disk
  1544.           boot/partition sector in the DOS area for the purposes of read/write
  1545.           testing (HDTEST only).
  1546.  
  1547.           /C(lone BIOS)n - used in systems which do not support the IBM BIOS's
  1548.           INT 11 "equipment determination" BIOS function (e.g. the Tandy 2000).
  1549.           The parameter ("n") is the number of floppy drives attached to the
  1550.           system, which is otherwise determined automatically (HDCHEK and
  1551.           HDTEST).
  1552.  
  1553.           /CQ (Compaq) - used to indicate that the program is running on a
  1554.           Compaq system. If DOS 3.31 (or above) is in use, large (> 32 Mb)
  1555.           devices are supported (HDCHEK and HDTEST).
  1556.  
  1557.           /D(OS interrupts) forces the program to use only DOS interrupts
  1558.           (INT 25 and INT 26) for access to the target device. May not be
  1559.           combined with the /I, /H, or /U flag (HDCHEK and HDTEST).
  1560.  
  1561.           /F(ast mode) limits read/write testing to the use of two patterns
  1562.           only (HDTEST only).
  1563.  
  1564.           /G(ive error details) allows the physical disk location of bad sectors
  1565.           to be identified (HDTEST only).
  1566.  
  1567.           /H(ex BIOS address)nnnn[:nnnn] - used to tell the HD programs that the
  1568.           ROM BIOS of the device being tested is located at nnnn, which is
  1569.           interpreted as a Hexadecimal segment address, rather than at the
  1570.           (CPU-dependent) default. The extended (segment:offset) form of the
  1571.           command is used to force the programs to use the given address as the
  1572.           INT 13 entry point (HDCHEK and HDTEST).
  1573.  
  1574.           /I(nterrupt 13) - forces the program to use the existing INT 13
  1575.           vector.  This is the default under DOS 2.x. May not be combined with
  1576.           the /D, /H, or /U flag (HDCHEK and HDTEST).
  1577.  
  1578.           /M(ulti-track read problem) - bypasses the multi-track read problem
  1579.           which also prevents certain otherwise IBM-compatible clones from
  1580.           running PC-DOS 3.3 (HDCHEK and HDTEST).
  1581.  
  1582.           /N(o Query) - disables the individual prompts for confirmation which
  1583.           the program normally issues before remapping "special" clusters - does
  1584.           not prevent the program from prompting for confirmation before          ___                                                           
  1585.           updating the disk (HDTEST only).
  1586.  
  1587.           /P(rint) - causes the log file to be directed to the PRN device
  1588.           (HDTEST only).
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.           
  1596.           
  1597.                                          Page 24 
  1598.            
  1599.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1600.           
  1601.           
  1602.           /R(epeat)n - causes HDTEST to perform n complete testing cycles (or to
  1603.           continue until interrupted for n=0) (HDTEST only).
  1604.  
  1605.           /S(tart from)nnnnn - causes HDTEST to start testing occupied clusters                                                              ________         
  1606.           at cluster number nnnnn (expressed as a decimal number) (HDTEST only).
  1607.  
  1608.           /U(se existing INT 68 vector) - causes the HD programs to use the
  1609.           existing INT 68 vector as the INT 13 entry point (HDCHEK and HDTEST).                   ______                                                      
  1610.  
  1611.           /X(clude marked bad sectors) - causes HDTEST to report on but not
  1612.           retest clusters that are already marked as bad (HDTEST only).
  1613.  
  1614.           /Y(es, please remap)n - allows HDTEST to update the disk by remapping
  1615.           up to n new bad sectors without prompting for confirmation (HDTEST                                  _______                                   
  1616.           only).
  1617.  
  1618.           /Z(ap bad sectors)n - controls remapping of unreadable sectors in bad
  1619.           clusters (HDTEST only) - n may have one of the following values:
  1620.               0 - Remap clusters with any unreadable sectors to all NULLs
  1621.               1 (default) - Remap only actual unreadable sectors to NULLs
  1622.               2 - Transfer all data read to the new cluster
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.           
  1660.           
  1661.                                          Page 25 
  1662.            
  1663.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1664.           
  1665.           
  1666.                              APPENDIX B - DISK ERROR MESSAGES                             ________________________________
  1667.  
  1668.           Users of earlier versions of this software repeatedly requested that I
  1669.           provide a more detailed explanation of the significance of some of the
  1670.           error messages displayed by HDTEST when it encounters a bad sector or
  1671.           cluster on the disk. It is not possible to do this without assuming
  1672.           (or imparting) a more detailed understanding of the "nitty-gritty"
  1673.           details of data storage on hard and floppy disks than most people want
  1674.           or need, let alone possess. This Appendix is not, therefore, "required
  1675.           reading" for the safe or effective use of the HD programs. It is
  1676.           intended as a tutorial for those who would like to understand some-
  1677.           thing more of what is really going on on their hard or floppy disk                                ______                                      
  1678.           drive when the little red light comes on.
  1679.  
  1680.           For the purposes of what follows, it is (fortunately) not necessary to
  1681.           know or understand exactly how changes in magnetic flux on the surface
  1682.           of a hard (or floppy) disk are translated into binary data, or vice
  1683.           versa. That could be the subject of another long dissertation. I will
  1684.           simply take for granted that binary data, conceptually organized into
  1685.           8-bit bytes, can be read and written by the disk drive hardware under
  1686.           the command of its controller (which usually resides on a separate
  1687.           card plugged into one of the computer's expansion slots). I will be
  1688.           describing how blocks of data are physically arranged on a disk and
  1689.           how the disk controller goes about ensuring that the data it reads has
  1690.           not been corrupted since it was written.
  1691.  
  1692.           I propose to start off by referring to some of the error-detection and
  1693.           error-correction techniques and procedures that are applied to data
  1694.           stored on magnetic media. These techniques and procedures are
  1695.           necessary because, although magnetic media are very reliable and the
  1696.           technology of recording and playback is well understood, there always
  1697.           remains the possibility that a defect in the medium or some other
  1698.           intercurrent problem may cause the sequence of bytes read back from a
  1699.           disk or tape to be something other than a perfect duplicate of the
  1700.           sequence that was stored. If a single copy of the raw data were all
  1701.           that were recorded, there would be no way of immediately detecting
  1702.           (let alone correcting) such an error. It might be brought to light
  1703.           when the file that was changed caused problems when it is used by or
  1704.           executed as a program, but it might not become apparent until it had
  1705.           propagated itself through and caused problems or errors in multiple
  1706.           other programs or files. This would clearly be an unacceptable state
  1707.           of affairs. In order to prevent this from occurring, then, there
  1708.           should be some means of checking data which is read in from storage
  1709.           for errors, and/or (preferably) of correcting any errors which may
  1710.           have occurred before any use is made of the data.                        ______                             
  1711.  
  1712.           Although error checking and/or correction can (and sometimes does)
  1713.           take place at any level from that of the application program down to
  1714.           that of the device controller, I am only going to describe the means
  1715.           that are used by hard and floppy disk controllers. When a block of
  1716.           data is passed to the controller to be written to the disk, a series
  1717.           of arithmetical operations is performed in sequence on all the bytes
  1718.           in the block, to produce a 2-byte (for diskettes) or multi-byte (for
  1719.           hard drives) code. The diskette controller implements what is known as
  1720.           a cyclic redundancy check (CRC) algorithm, which is optimized to allow
  1721.           detection of all single bit errors and many longer error bursts (it is          _________                                                             
  1722.           reasonable to assume that errors will most probably either affect a
  1723.           
  1724.           
  1725.                                          Page 26 
  1726.            
  1727.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1728.           
  1729.           
  1730.           single bit at random or, if they result from media defects, a number
  1731.           of adjacent bits). The longer (at least 32-bit) error correcting code
  1732.           (ECC) calculated by a hard disk controller gives enough information to
  1733.           allow detection and correction of, at least, all single bit errors and                          ______________                                        
  1734.           detection of most likely longer error bursts. The CRC or ECC is saved
  1735.           on disk with the data and is read back in by the controller when the
  1736.           data is read. The controller then compares the saved CRC or ECC with
  1737.           one newly calculated from the data. If the two are identical, the data
  1738.           is assumed to be valid and a successful read is signalled. If there is
  1739.           a discrepancy, a diskette controller always returns the data with a
  1740.           "CRC error", since the CRC code does not contain enough information to
  1741.           allow the incorrect bit or bits to be identified. On a hard disk, if
  1742.           the ECC comparison suggests a correctable error, it will be corrected,
  1743.           and the read call will return with a "Corrected ECC Error" code but
  1744.           with (presumably) valid data in the transfer buffer. If a more
  1745.           extensive error is detected, on the other hand, the call returns with
  1746.           a "Uncorrectable ECC Error" code (which is the same as the CRC error
  1747.           code).
  1748.  
  1749.           The 32-bit ECC used by IBM and many compatible disk manufacturers
  1750.           allows correction of single-bit errors only. Manufacturers of other,                                                 ____                         
  1751.           usually more expensive, controllers use longer and more complex ECCs,
  1752.           to allow the correction of some multi-bit errors, but the necessity to
  1753.           minimize the time taken to calculate the ECC (which is part of "access
  1754.           time") sets tight limits on how complex it can be. ECC error
  1755.           correction is unfortunately not infallible. It is possible for a                                      ___                                 
  1756.           complex, uncorrectable error to result in the same ECC disparity as a                   __                                                          
  1757.           different, correctable, error, so that invalid "corrected" data can be                                                                          ______
  1758.           returned. The longer and more complex the ECC, the less likely this
  1759.           becomes, but there is no way of completely avoiding this ambiguity,
  1760.           short of keeping multiple copies of the data on the disk. In addition,
  1761.           some hard disk controllers* apparently abort with the "corrected ECC
  1762.           error" code immediately on encountering a sector containing such an                      ___________                                            
  1763.           error, even if it is not the last sector in the block specified by a                               ___                                            
  1764.           (multi-sector) read request. This non-intuitive (to say the least of
  1765.           it) behavior can combine with DOS 3.x's habit of ignoring corrected                                                           ________          
  1766.           ECC errors to result in apparently inexplicable disk-related problems,
  1767.           up to and including system crashes (if the file in which the problem
  1768.           occurred contained executable code). This hardware deficiency may be
  1769.           related to the problems which have plagued users of DOS 3.3 on some
  1770.           (previously) apparently IBM-compatible non-IBM hardware, since these
  1771.           also result from (similar but distinct) deficiencies in the clones'
  1772.           handling of multi-sector disk reads. Prior to V4.36, HDTEST did retry                                                                      ___      
  1773.           corrected ECC errors which were reported on the first read of a
  1774.           cluster, but would eventually (if the corrected error persisted)
  1775.           accept the data read as valid and copy and remap it to a "good"
  1776.           cluster. This could cause trouble if the controller had the "immediate
  1777.           abort on corrected ECC error" problem described above and the ECC                                                                ___        
  1778.           error were not in the last sector of the cluster, since the sectors
  1779.           after the "bad" one would not have been read, and would be lost
  1780.           (actually replaced by the corresponding sectors from the previous                                                                   ________
  1781.           cluster read) after remapping. On a machine with this problem, DOS
  1782.  
  1783.           _____________________________________________________________________
  1784.  
  1785.           * This behavior is known to occur with some early Western Digital
  1786.           controllers (1002A-WX1, 1002S-WX2) but it may occur with others, too.
  1787.           
  1788.           
  1789.                                          Page 27 
  1790.            
  1791.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1792.           
  1793.           
  1794.           would not, of course, have done any better than the earlier versions
  1795.           of HDTEST at reading the bad cluster, and HDTEST at least warned you
  1796.           that there was a problem, but the behavior described was certainly not
  1797.           ideal. From V4.36, HDTEST rereads clusters in which a persistent
  1798.           corrected ECC error is reported on the initial read sector by sector,                                                              ________________ 
  1799.           to ensure that all the data in the cluster is transferred when it is                         ___                                                  
  1800.           remapped. In most cases (as long as the ECC error was really                                                                ______
  1801.           correctable), this will save the cluster (and the file of which it is
  1802.           a part) intact.
  1803.  
  1804.           DOS allows the programmer and/or computer user to think of and deal
  1805.           with disk data in terms of files, lines, and/or records, but data is
  1806.           always moved between a disk and memory a sector at a time. Any disk
  1807.           read or write request passed to DOS eventually gets translated into a
  1808.           command to read or write one or more sectors on the disk, commencing
  1809.           at a specified head, track, and sector. A floppy disk may have either
  1810.           one or two usable surfaces, corresponding to the top and bottom of the                            ________                                            
  1811.           disk. A hard disk usually has at least two surfaces, and may have
  1812.           more, since multiple physical "platters" are frequently incorporated
  1813.           in a single device. Each surface is normally accessed by and
  1814.           corresponds to a single read/write head, which moves radially across                                             ____                             
  1815.           it, although one surface on newer disks is often reserved for "servo"
  1816.           tracks, which are written with a special pattern that allows the
  1817.           controller to ensure that the read/write heads are kept exactly
  1818.           aligned with the data tracks. For a single device, the (data) heads
  1819.           are, by convention, numbered sequentially from zero up to one less
  1820.           than the total number present. Each surface is further divided into a
  1821.           number of circumferential tracks (or cylinders) and each track is                                    ______     _________                   
  1822.           divided into a number of sectors. Again by convention, the tracks on                                   _______                                    
  1823.           each surface are also numbered sequentially from zero, with track zero
  1824.           being the outermost track. The sectors on each track are normally
  1825.           numbered from one to a number corresponding to the total number of                        ___                                                 
  1826.           sectors on the track, but adjacent sectors do not normally have                                                        ___              
  1827.           consecutive sector numbers. A typical arrangement of the seventeen
  1828.           sectors on a single track of an XT hard disk, for example, would be as
  1829.           follows: 1,8,15,5,12,2,9,16,6,13,3,10,17,7,14,4,11. This "inter-                                                                    ______
  1830.           leaving" of sectors helps to make multi-sector disk reads and writes          _______                                                             
  1831.           more efficient. The controller requires a finite time to process the
  1832.           data from one sector before it can start reading (or writing) the
  1833.           next. During this time, of course, the disk continues to rotate and
  1834.           one or more of the sectors which physically "follow" the one that was
  1835.           last accessed pass under the read/write head unread. Ideally, the
  1836.           interleave (number of physical sectors separating consecutively
  1837.           numbered sectors) should be such that the next sector is just about to
  1838.           come under the read-write head when the controller is free to deal
  1839.           with it, but, because this time is not exactly predictable, it is
  1840.           better to be too conservative (as IBM usually is) and make it one or
  1841.           two sectors longer than necessary than to be too optimistic. Too small
  1842.           an interleave value is very undesirable, because it results in the
  1843.           controller having to wait almost a complete disk rotation time for
  1844.           each sector it misses to come round again.
  1845.  
  1846.           At the beginning of each disk sector is an address mark, a short,                                                     ____________          
  1847.           recognizable (to the controller) bit sequence containing the track and
  1848.           sector number. The process of writing the address marks for each
  1849.           sector on a disk is known as "low-level" or "sector" formatting. The
  1850.           DOS FORMAT program does this when it is run on floppy disks, but on
  1851.           
  1852.           
  1853.                                          Page 28 
  1854.            
  1855.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1856.           
  1857.           
  1858.           hard disks the DOS program merely makes sure that all required address
  1859.           marks are present - they are created by the disk manufacturer or
  1860.           supplier's low-level format program, which may or may not be available
  1861.           to the end user. After each address mark there follows a short gap (to
  1862.           allow the controller time to recognize and respond to the address
  1863.           mark), then the raw data, then the CRC or ECC data. A sector normally
  1864.           contains 512 bytes of raw data, but DOS (and HDTEST) can recognize and
  1865.           deal appropriately with devices with non-standard sector sizes.
  1866.  
  1867.           When a sector read/write command is passed to the disk controller, it
  1868.           (the controller) causes the disk's read/write head to move (seek) to                                                                      ____    
  1869.           the specified track, waits a few milliseconds for it to settle down,
  1870.           and then starts to "pay attention to" the data passing underneath it.
  1871.           The controller locates and reads the address marks to confirm that the
  1872.           read/write head is positioned at the correct track and to identify
  1873.           each sector. If data is being read from the disk, the raw data and
  1874.           recorded CRC or ECC from the requested sector(s) are transferred into
  1875.           the disk controller's internal buffers and (assuming that no errors
  1876.           are detected), thence to main memory. If data is being written, the
  1877.           controller derives the error-checking data from the raw data and
  1878.           writes both to the disk. Some of this process is under the direct
  1879.           control of the controller hardware, but it is supervised by the
  1880.           device's ROM BIOS, which is responsible for error-reporting. Errors
  1881.           can occur at almost any stage of the read/write process, but (if the
  1882.           disk is working at all) usually result from media defects or problems
  1883.           developing in the mechanical components of the hard disk drive. Media
  1884.           defects, once present, are generally constant in size and position
  1885.           (although jarring a disk while it is being written to may sometimes
  1886.           generate a temporary bad sector).                     _________             
  1887.  
  1888.           When HDTEST detects an error during read/write testing of a sector or
  1889.           cluster which has not previously been marked as bad, a (normally)
  1890.           four-line error message is printed, either to the screen (by default),
  1891.           to the printer (/P option), or to the logging file (if an output
  1892.           device was specified). The first line of the message simply indicates
  1893.           the sector or cluster number at which the error occurred. The second
  1894.           line indicates what sort of error was detected and during what phase
  1895.           of read/write testing it occurred. The third line indicates whether
  1896.           HDTEST was able to recover and/or remap the data from the bad sector
  1897.           or cluster, and the fourth indicates either the file which a bad
  1898.           cluster formed part of or that the cluster was not in use. If it was
  1899.           not possible to read one or more sectors from a cluster which
  1900.           contained data (unrecoverable read error), a further two-line message
  1901.           is printed which notes how many sectors were unreadable and how the                                          _______                            
  1902.           data from the bad cluster has been remapped (which depends on whether
  1903.           a /Zn option was specified on the command line). If the /M flag is
  1904.           not specified when HDTEST is run on a system that suffers from the
  1905.           "multi-track read" problems discussed in the main part of the
  1906.           documentation, multiple bad clusters may be reported with no errors                                                                    __       
  1907.           persisting on sector-by sector reading. These reports should disappear
  1908.           if the /M flag is used.
  1909.  
  1910.           If the "verbose" form of the /G option is used, the bad sector report
  1911.           will contain the equivalent of the second and third lines of the bad
  1912.           cluster report for each bad sector. Note that, if the /X option is not                         ___________________                                    
  1913.           used to prevent testing of previously flagged bad clusters, these may
  1914.           give rise to spurious warnings of possible data loss in the third line
  1915.           
  1916.           
  1917.                                          Page 29 
  1918.            
  1919.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1920.           
  1921.           
  1922.           of the bad sector report. If no unrecoverable bad clusters were                                                            ________     
  1923.           reported, such warnings can safely be ignored. If the default form of
  1924.           the /G option is used, the bad sector report gives only a Hex error
  1925.           code for each bad sector. The LSB of this code is the value returned
  1926.           (in AH) by INT 13. The MSB of the code depends on the phase of testing
  1927.           during which the error occurred. In general, if the first digit (of a
  1928.           four digit code) is C or above, an unrecoverable error occurred, but
  1929.           error codes FFFD through FFFF have special meanings and indicate
  1930.           recovered errors.
  1931.  
  1932.           When the program detects an error during read/write testing of a
  1933.           sector in the DOS area, only the first three lines described above are
  1934.           printed and the program aborts. The remainder of this Appendix
  1935.           contains more details of and further information on the possible
  1936.           contents of lines two and three of HDTEST's disk error message.
  1937.  
  1938.           The second line of the disk read/write error message will usually take
  1939.           the form: "[Error Type] occurred during [phase of testing]". Possible
  1940.           values for [Error Type] are as follows (in alphabetical order):
  1941.  
  1942.           Address Mark Not Found - this is a fairly common error reported for
  1943.           bad blocks which are present from "scratch" on a new disk, since a
  1944.           significant media defect may well not retain sector formatting data
  1945.           and/or the manufacturer may have made sure that a known bad track on
  1946.           the disk will not be used by deliberately not writing address marks
  1947.           there. If new bad clusters are reported with this error message, it is
  1948.           likely that the hard disk surface has been physically damaged (perhaps
  1949.           by a shock to the drive) but possible that the controller has a
  1950.           problem.
  1951.  
  1952.           Bad Controller - this means what it says, but check that all boards
  1953.           and cables are properly seated before giving up.
  1954.  
  1955.           Bad Sector - the BIOS was instructed to read a sector number which
  1956.           should not (according to its configuration data) exist on the device.
  1957.           This indicates either an internal program error or that the program is
  1958.           having a problem determining the physical layout of the disk. Check
  1959.           the values reported by HDCHEK against those in the disk documentation.
  1960.  
  1961.           Bad Track - analogous to "Bad Sector".
  1962.  
  1963.           Buffer Comparison - the data read from a sector differs from that
  1964.           written to it. This should not happen, since it suggests either that
  1965.           the device's error-detection functionality has failed or that it has
  1966.           been overwhelmed. If it does occur, the most likely causes are
  1967.           controller and memory problems (in that order of likelihood).
  1968.  
  1969.           Corrected ECC - as discussed at some length above, the data retrieved
  1970.           from a hard disk was incorrect but the device's error-correction
  1971.           hardware was (probably) able to correct it.
  1972.  
  1973.           DMA Boundary Violation - should not occur (HDTEST positions its
  1974.           buffers to avoid crossing absolute segment boundaries). Suggests
  1975.           either an internal program error or a controller/BIOS problem.
  1976.  
  1977.  
  1978.  
  1979.           
  1980.           
  1981.                                          Page 30 
  1982.            
  1983.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1984.           
  1985.           
  1986.           Hardware Timeout - a seek or other operation was not completed within
  1987.           the maximum time allowed by the BIOS. Check connections, reseat
  1988.           boards, otherwise suspect the mechanics of the disk.
  1989.  
  1990.           Init Fail - should not occur (on a working disk).
  1991.  
  1992.           Internal - internal program error. Make sure that your working copy of
  1993.           HDTEST has not been corrupted. The disk is probably not defective.
  1994.  
  1995.           Invalid Command - should not occur. Treat as Internal Error.
  1996.  
  1997.           Multiple Errors - one or more additional errors occurred while HDTEST
  1998.           was attempting to recover from an initial one. Multiple phase report
  1999.           lines will be printed but the error types cannot be further specified.
  2000.  
  2001.           Recovered - HDTEST recovered from the error and did not report on the
  2002.           error type (should not occur).
  2003.  
  2004.           Reset Fail - The device could not be reset (after an error). Usually
  2005.           indicates major problems with the disk or controller, but check
  2006.           connections, etc.
  2007.  
  2008.           Sector Not Found - the requested sector's address mark was not found.
  2009.           Likely to result from a media defect.
  2010.  
  2011.           Seek Fail - after a seek to a track, the controller found that the
  2012.           read/write head was not positioned correctly. Usually indicates a
  2013.           significant problem with the (drive) hardware.
  2014.  
  2015.           Sense Fail - the controller cannot find the drive! Check connections,
  2016.           etc.
  2017.  
  2018.           Uncorrected ECC - data error too major to be corrected. Usually a
  2019.           media defect. This message will also be produced if a CRC error is
  2020.           detected on a floppy disk.
  2021.  
  2022.           Undefined - the BIOS cannot figure out what went wrong, but something
  2023.           did!
  2024.  
  2025.           Unknown - likewise!
  2026.  
  2027.           Write Protection - HDTEST is attempting to write to a write-protected
  2028.           device.
  2029.  
  2030.  
  2031.           Possible forms for the rest of the second line are as follows:
  2032.  
  2033.           ... Error (unrecovered) occurred during first read - the cluster could
  2034.           not be read without error in five tries before a seek to the other
  2035.           "end" of the disk.
  2036.  
  2037.           ... Error occurred during first read - the error occurred during the
  2038.           first read but was recovered after one or more retries.
  2039.  
  2040.           ... Error occurred during read after seek - the error occurred when
  2041.           the cluster was read after a seek away.
  2042.  
  2043.           
  2044.           
  2045.                                          Page 31 
  2046.            
  2047.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  2048.           
  2049.           
  2050.           ... Error occurred during pattern read/writes - the error occurred
  2051.           during the pattern read/write phase of testing.
  2052.  
  2053.           ... Error occurred during final write - the error occurred when the
  2054.           saved copy of the cluster was being restored to the disk.
  2055.  
  2056.           ... Error occurred during read after final write - the error occurred
  2057.           when the restored cluster was being read back.
  2058.  
  2059.           ... (Buffer comparison) error occurred after final read - the copy of
  2060.           the cluster read back after restoration to the disk differed from its
  2061.           original memory image.
  2062.  
  2063.  
  2064.           There are only three basic forms of the third line:
  2065.  
  2066.           This error is (or "These errors are") recoverable (no data loss has
  2067.           occurred). - the bad cluster was read successfully and has been
  2068.           successfully restored to its original form, but it remains suspect and
  2069.           will (with your permission) be remapped.
  2070.  
  2071.           This error is unrecoverable, but remapping is possible. - the bad
  2072.           cluster was read successfully but has not been restored to its                                                ___                     
  2073.           original form. Remapping should be successful, but the data will be
  2074.           lost if this is not permitted.
  2075.  
  2076.           This error is unrecoverable, and data may be lost! - the bad cluster
  2077.           was not read successfully and will be remapped as provided by the
  2078.           value of the /Z switch parameter if remapping is permitted. In any
  2079.           event, some data loss has almost certainly occurred.
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.           
  2108.           
  2109.                                          Page 32 
  2110.                 
  2111.                Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher               _______________________________        _______________________________
  2112.                
  2113.                
  2114.  
  2115.                    APPENDIX C - EXAMPLE PROGRAM RUNS                   _________________________________
  2116.  
  2117.      Screen display from successful run of HDCHEK on partition occupying the
  2118.      whole of a 20 Mb hard disk:
  2119.  
  2120. Device C: appears to be the DOS partition of a hard disk
  2121. It contains 41531 sectors
  2122. It starts at absolute sector 17 on the disk      {THIS IS CORRECT}                                                  _______________ 
  2123. The total partition size is approximately 20 Mb
  2124. There are 4 heads and 17 sectors/track
  2125. Sector size is 512 bytes
  2126. Each of the 2 (16 bit) FATs occupies 41 sectors
  2127. The Root Directory occupies 32 sectors
  2128. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2129. consisting of 4 sectors
  2130. The directory scan was successful; a total of 1260 files and subdirectories
  2131. was found.
  2132.  
  2133.  
  2134.  
  2135.      Screen display from successful run of HDCHEK on a freshly FORMATted DSDD
  2136.      9-sector floppy disk:
  2137.  
  2138. Device A: is not a hard disk - using DOS interrupts
  2139.  
  2140.  
  2141. Device A: is a floppy disk
  2142. The disk contains 720 sectors
  2143. There are 2 heads and 9 sectors/track
  2144. Sector size is 512 bytes
  2145. Each of the 2 (12 bit) FATs occupies 2 sectors
  2146. The Root Directory occupies 7 sectors
  2147. The data area starts at DOS sector 12, and contains 354 clusters, each
  2148. consisting of 2 sectors
  2149. The directory scan was successful; a total of 0 files and subdirectories
  2150. was found.
  2151.  
  2152.  
  2153.      Screen display from run of HDCHEK on 20 Mb DOS partition - directory
  2154.      structure bad or unrecognizable:
  2155.  
  2156. Device C: appears to be the DOS partition of a hard disk
  2157. It contains 41531 sectors
  2158. It starts at absolute sector 17 on the disk
  2159. The total partition size is approximately 20 Mb
  2160. There are 4 heads and 17 sectors/track
  2161. Sector size is 512 bytes
  2162. Each of the 2 (16 bit) FATs occupies 41 sectors
  2163. The Root Directory occupies 32 sectors
  2164. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2165. consisting of 4 sectors
  2166. The preliminary directory scan failed.
  2167.  
  2168.  
  2169.  
  2170.  
  2171.                
  2172.                
  2173.                                               Page 33 
  2174.                 
  2175.                Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher               _______________________________        _______________________________
  2176.                
  2177.                
  2178.      Screen display from run of HDCHEK on 20 Mb DOS partition - FATs not
  2179.      identical:
  2180.  
  2181. FATS are different
  2182. FAT discrepancy at byte 20F - FAT 1 has FF; FAT 2 has F8
  2183. Continue comparison (Y/N)? [Y]: n     {user input}                                _                 
  2184.  
  2185. Device C: appears to be the DOS partition of a hard disk
  2186. It contains 41531 sectors
  2187. It starts at absolute sector 17 on the disk
  2188. The total partition size is approximately 20 Mb
  2189. There are 4 heads and 17 sectors/track
  2190. Sector size is 512 bytes
  2191. Each of the 2 (16 bit) FATs occupies 41 sectors
  2192. The Root Directory occupies 32 sectors
  2193. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2194. consisting of 4 sectors
  2195.  
  2196.  
  2197.  
  2198.      Screen display from run of HDCHEK - program unable to deduce disk
  2199.      structure - disk not recognizable as a DOS device:
  2200.  
  2201. Unrecognized media descriptor byte! - see error code
  2202. Error Code = F1      {F1 is not a media descriptor byte used by DOS}
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.                
  2236.                
  2237.                                               Page 34 
  2238.            
  2239.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  2240.           
  2241.           
  2242.      Log file from successful run of HDTEST on 20 Mb DOS partition:
  2243.  
  2244.      HDTEST Log File - Wed Jan 07 11:44:52 1986
  2245.      Testing Device C:
  2246.  
  2247.      No new bad clusters identified - HDTEST finished.
  2248.      Wed Jan 07 16:10:41 1987
  2249.  
  2250.  
  2251.      Log file from run of HDTEST on 20 Mb DOS partition - one bad cluster
  2252.      detected and remapped:
  2253.  
  2254.      HDTEST Log File - Mon Jan 05 21:09:32 1987
  2255.      Testing Device C:
  2256.  
  2257.      Read/Write error at cluster number 7623!!
  2258.      Corrected ECC error occurred during pattern read/writes
  2259.      This error is recoverable (no data loss has occurred).
  2260.      Bad cluster is in file \MYFILES\DATA5\FFT1234.DAT
  2261.  
  2262.      1 new bad clusters identified, marked, and remapped - HDTEST finished.
  2263.      Tue Jan 06 05:08:04 1987
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.           
  2300.           
  2301.                                          Page 35 
  2302.  
  2303.                         REGISTRATION FORM - HDTEST V4.84                        ________________________________
  2304.  
  2305.      Please complete this form and return it with a check or money order for
  2306.      $35.00 (+ $5.00 for shipping outside North America) or equivalent to:
  2307.  
  2308.                      Peter R. Fletcher
  2309.                      1515 West Montgomery Avenue
  2310.                      Rosemont
  2311.                      PA 19010
  2312.                      U.S.A.
  2313.  
  2314.      None of the information on this form will be passed on to any other
  2315.      individual or commercial organization.
  2316.  
  2317.      --------------------------------------------------------------------------
  2318.  
  2319.      This information is required to process your Registration:
  2320.  
  2321.      Last Name:____________________________  Other Names:______________________
  2322.  
  2323.      Address:______________________________  Town/City:________________________
  2324.  
  2325.      State:_____________  Post Code:____________  Telephone:_________________
  2326.                                                            (evenings/weekends)
  2327.  
  2328.      I understand that this software is supplied without warranty, express or
  2329.      implied, and agree not to hold its author liable for any direct or
  2330.      consequential loss arising out of my use of it.
  2331.  
  2332.      Signature:______________________________
  2333.  
  2334.      -------------------------------------------------------------------------
  2335.  
  2336.      You are requested, but not required, also to answer the following
  2337.      questions:
  2338.  
  2339.      On What type(s) of computer are you using HDTEST? _________________________
  2340.  
  2341.      CPU (8088, 8086, etc.)? __________   Amount of RAM (kB)? ____________
  2342.  
  2343.      Type & Size of Hard Disk(s)? ____________________________________
  2344.  
  2345.      Make and Type of Hard Disk Controller(s)? ______________________________
  2346.  
  2347.      Do you own a Modem?                                             Y  N
  2348.  
  2349.      Are you a member of BIX?   Y  N        Compuserve?              Y  N
  2350.  
  2351.      How did you obtain/hear about this program?
  2352.  
  2353.      Did you think that the $35.00 registration fee for this program was:
  2354.  
  2355.      Very Good Value?              About Right?             Excessively High?
  2356.  
  2357.  
  2358.      Are there any other utility programs that you would like to see made
  2359.      available as "User Supported Software"? What sort of programs?
  2360.  
  2361.